Statistics and data

Standard Deviation Calculator

Measure the spread of your numbers with sample or population standard deviation, plus variance, mean, sum, and count.

Calculate standard deviation for a list of numbers

Sample: divide squared deviations by n − 1. Enter at least 2 values representing a sample from a larger group.

Enter one number per line. Blank lines are ignored. Grouped thousands are allowed: 1,000 on one line means one thousand.

Up to 200 numbers; 15 integer digits and 10 decimal places each.

Sample standard deviation (s)

Enter your numbers, choose Sample or Population, then select Calculate.

Enter adds a new line. Press Ctrl+Enter or Command+Enter to calculate, or select Calculate. Calculations run in your browser; successful results appear in this tab's Recent calculations.

Formulas and a worked example

For the numbers 2, 4, 4, 4, 5, 5, 7, 9, the sum is 40, the count n is 8, and the mean is 5. The squared deviations from 5 are 9, 1, 1, 1, 0, 0, 4, and 16. They add up to 32.

Population

Divide by the full count

σ² = Σ(x − mean)² ÷ n
σ = √σ²

Population variance is 32 ÷ 8 = 4. Population standard deviation is √4 = 2.

Use this calculation when these eight values are the whole group you intend to describe.

Sample

Divide by one less than the count

s² = Σ(x − mean)² ÷ (n − 1)
s = √s²

Sample variance is 32 ÷ 7 ≈ 4.5714. Sample standard deviation is √(32 ÷ 7) ≈ 2.1381.

A sample needs at least two observations. The n − 1 denominator gives a different result from the population calculation.

No variation

All values are the same

5, 5, 5 → squared deviations sum to 0

Both sample and population variance and standard deviation are 0. The mean is 5.

A population with one value also has zero spread. Sample standard deviation is undefined for just one value.

What the results mean

The mean locates the center; standard deviation measures the spread around it. Variance is the average squared deviation using the selected denominator. Taking its square root returns the result to the original measurement unit. If inputs are in centimeters, standard deviation is in centimeters and variance is in square centimeters.

Extreme values can increase standard deviation because their deviations are squared. Inspect the original data and compare other summaries when needed. This calculator does not test whether data follow a normal distribution, calculate confidence intervals, or make a claim about the percentage of observations within a given number of standard deviations.

Exact arithmetic and display rounding

The sum, mean, squared deviations, and variance are kept as exact fractions. This preserves small differences between very large decimal values. Standard deviation is rounded directly using integer square-root and midpoint comparisons, so its displayed digits do not depend on an intermediate approximation of the square root.

Results show 4 decimal places by default, with 0, 2, 4, 6, or 10 available. Exact halfway values round away from zero. ≈ appears only when a displayed number differs from the exact statistic. For example, a population standard deviation of exactly 2 does not need ≈, while √2 does. Count is always an exact whole number.

If a positive variance or standard deviation rounds to zero, a note shows the exact variance as a fraction and the standard deviation as its square root. Changing display precision uses the original statistics, not the previously displayed values. Changing input format or calculation mode clears the result until you calculate again.

References: the NIST guide to measures of scale discusses variance and standard deviation. OpenStax — Measures of the Spread of the Data explains the sample and population formulas and their units.

Common questions

Should I choose Sample or Population?

Choose Population when the list is the entire group you want to describe. Choose Sample when it represents a sample from a larger group. This choice depends on what your data represent, not simply on how many values you enter. Sample divides by n − 1; Population divides by n.

Can I paste a column from a spreadsheet?

Yes. Choose “One number per line” and paste one numeric column. Blank lines are ignored, and correctly grouped thousands such as 1,234.56 are accepted. Remove headers, units, and currency symbols. An invalid nonblank line produces an error rather than being skipped.

What do commas mean?

In line mode, 1,000 is one number equal to one thousand. In comma-separated mode, every comma separates values, so 1,000 means 1 and 0. Enter 1000 for one thousand in that mode. Empty entries such as 2,,4 and trailing commas are rejected.

How are negative values, zero, and repeated values handled?

All are valid observations. Repeated numbers count each time they appear. Every observation has equal weight. Squared deviations are nonnegative, so variance and standard deviation cannot be negative even when the inputs are.

What are the input limits?

Use 2–200 values for Sample or 1–200 for Population, with no more than 13,000 input characters in total. Each entry accepts up to 15 integer digits, 10 decimal digits, and 64 characters, with an optional keyboard plus or minus sign. Use a period for decimals and a leading zero, as in 0.5. Fractions, scientific notation, NaN, and Infinity are not accepted.

Is standard deviation the same as standard error?

No. Standard deviation describes variation among observations. Standard error describes uncertainty in an estimated quantity and depends on the statistical model and sampling assumptions. This calculator reports standard deviation and variance, not standard error.