Standard Deviation Calculator

Use this standard deviation calculator and variance calculator to describe the spread of a raw number list. Choose sample or population, then inspect the mean, observation count, squared deviations and divisor. Calculation steps explain why dividing by n − 1 differs from dividing by n, with no silent removal of invalid observations.

Method reviewed by the NumUtility editorial team · Updated October 25, 2026

Calculate standard deviation and variance

1–1,000 numbers, each from −1e12 to 1e12. Separate with spaces, commas, semicolons or new lines. Decimal point: dot; scientific notation accepted. No thousands separators, empty comma/semicolon items or ignored invalid values.
Sample standard deviation2.1380899353Sample variance4.57142857143Mean5Count8

Calculation steps

Mean = 40 ÷ 8 = 5. Sum of squared deviations = 32.

Divisor: 8 − 1 = 7. Variance = 32 ÷ 7 = 4.57142857143. Standard deviation = √variance = 2.1380899353.

Uses compensated sums and a corrected two-pass calculation. The squared-deviation total may receive a tiny floating-point residual correction before division. Displayed values are rounded, not intermediate inputs.

Show deviations and squares (8 observations)
Deviation from the calculated mean
ObservationValueDeviationSquared deviation
12-39
24-11
34-11
44-11
5500
6500
7724
89416

Descriptive calculations only. No weights, grouped intervals, missing-value imputation, normality check or confidence intervals. Double-precision arithmetic can round closely spaced values.

How to use this standard deviation calculator

Paste up to 1,000 raw numerical observations separated by commas, semicolons, whitespace or lines. Use dot decimals and no thousands separators. Each value must lie between −1e12 and 1e12. Choose sample when using the sample-variance equation, or population when summarizing the complete entered population under that definition. Sample mode requires at least two observations. Expand the deviations table to check each original value, its difference from the calculated mean and the corresponding square.

How the calculation works

Standard deviation describes how widely numerical observations vary around their mean, while variance expresses spread in squared units. If the input values are measured in minutes, the standard deviation is also in minutes but the variance is in square minutes. That distinction is important when copying an answer into a report. Neither result chooses a practical threshold for good or bad variability, and neither determines whether a process, investment or measurement system is acceptable.

Begin with the arithmetic mean of every valid observation. Subtract that mean from each value to obtain signed deviations, then square those deviations so that positive and negative differences do not cancel. Add the squares and divide by the chosen denominator. Taking the square root of the resulting variance returns standard deviation. The interface exposes the mean, squared-deviation sum and divisor so the selected definition can be checked rather than inferred from an unlabeled result.

Population mode divides by n, the count of entered observations. It treats that list as the full population being described, not as a sample needing a correction for estimating a larger population's variance. For the hypothetical values 2, 4, 4, 4, 5, 5, 7, 9, the mean is 5 and the squared deviations total 32. Dividing by 8 gives population variance 4 and taking its square root gives population standard deviation 2.

Sample mode divides by n − 1. On the same eight-value list, the denominator is 7, giving sample variance 32 / 7, approximately 4.57142857143, and sample standard deviation approximately 2.1380899353. The larger answer comes from the smaller denominator, not a different data set or an extra observation. Under the usual sampling assumptions, the correction concerns estimating population variance; it does not make every square-rooted sample standard deviation an exactly unbiased estimator.

With one observation, population variance and standard deviation are zero because that one-member population has no variation. Sample variance is undefined because n − 1 is zero, so sample mode reports an error instead of zero or infinity. An empty list is invalid in either mode. When at least two observations are identical, both definitions give zero spread. Negative values are supported normally; the deviations, not the signs of the original observations alone, determine the squared differences.

Adding the same constant to every value changes the mean but leaves variance unchanged in exact arithmetic. Multiplying every value by a factor multiplies standard deviation by the factor's absolute magnitude and variance by its square. For 1, 2, 3, population variance is 2/3. For 10, 20, 30, it is 200/3, while population standard deviation is ten times as large. Use these relationships to check unit conversions or rescaled classroom examples, not to erase the original units.

Computing a large raw sum of squares and subtracting a similarly large squared mean can lose precision when values are close together around a large offset. This implementation instead uses compensated sums and a corrected two-pass calculation centered on the mean. It also rejects underflowed nonzero spread rather than showing a misleading zero. All arithmetic still uses double precision, so extremely close decimal inputs can round together before the calculation. Rescale data or use specialized precision software when that distinction matters.

Standard deviation is sensitive to extreme observations because differences are squared. It is not a test for normality, proof of measurement quality or a confidence interval. This tool does not calculate standard error, weighted variance, grouped frequency estimates, missing-value imputation or outlier removal. Keep the full data record and chosen denominator with the result. If one token is invalid, correct it rather than allowing a shorter, unannounced sample to create a plausible-looking but different statistic.

Formulas

Population variance and deviation

σ² = Σ(x − mean)² / n; σ = √σ²

Sample variance and deviation

s² = Σ(x − mean)² / (n − 1); s = √s²; n ≥ 2

Arithmetic mean

mean = Σx / n

Worked examples

Compare the two denominators

For 2, 4, 4, 4, 5, 5, 7, 9, mean = 5 and squared deviations sum to 32. Population: variance 4, standard deviation 2. Sample: variance 32/7, standard deviation √(32/7), about 2.13809.

Constant and singleton data

For 6, 6, 6, both definitions return variance and standard deviation zero. For a single 6, population mode still returns zero, but sample mode rejects the zero denominator rather than treating an undefined sample statistic as a valid zero.

Common uses

Check coursework definitions

Compare sample and population equations on exactly the same raw observations. Preserve the selected divisor with the result rather than reporting an unlabeled standard deviation.

Describe repeated measurements

Summarize observed variation around a mean after checking the readings and units. A spread result does not certify an instrument or establish an acceptable tolerance.

Compare rescaled data

Check how a unit conversion changes variance in squared units and standard deviation in original units. Do not compare numerical magnitudes across incompatible units or treat a smaller number as automatically better.

Accuracy and limitations

Compensated sums and a corrected two-pass algorithm reduce cancellation from large common offsets. Display rounding is separate from arithmetic; double-precision resolution still limits very close observations.

Sample requires at least two values; population permits a singleton with zero variance. This descriptive tool does not infer normality, standard error, confidence intervals, weighted samples or representative sampling.

Sources and methodology

These primary references explain the numerical methods and units used here. Review the calculation assumptions and limitations alongside the result.

Frequently asked questions

Should I choose sample or population?

Choose the definition required by the question. Sample divides by n − 1; population divides by n. The tool cannot infer a sampling design from the numbers alone.

Is variance the same as standard deviation?

No. Standard deviation is the square root of variance. Variance uses squared units; standard deviation uses the original units.

Why does sample mode need two numbers?

With one observation its divisor n − 1 is zero. The sample statistic is undefined, not zero.

Is standard deviation the same as standard error?

No. This tool describes observed spread; it does not calculate uncertainty in an estimated mean or a confidence interval.

Does it remove outliers?

No. Every valid observation participates. Invalid values cause an error instead of being removed.

Can I paste decimal-comma numbers?

No. Use a dot for decimals. Commas are list separators, so 1,5 represents two observations rather than the decimal 1.5.

Related calculators

Related guides