Sample & population formulasReviewed 28 Sep 2026Runs in your browser

Standard Deviation Calculator

Paste a list of numbers to get the sample or population standard deviation, variance, mean, sum of squares, coefficient of variation and a 95% confidence interval for the mean — with every step of the working shown.

Who wrote it

Written by Suhaib Hassan. The formulas follow the NIST/SEMATECH Engineering Statistics Handbook. Our methodology.

How the engine works

It uses the two-pass method — find the mean, then sum the squared deviations from it — which avoids the rounding errors of the shortcut formula.

Why we built it

Most calculators return a bare number. This one shows the deviation table, says which divisor it used, and plots your data against the matching bell curve.

Data set

Data type

—

—

Separate values with commas, spaces or new lines. Anything that is not a number is ignored.

Formula in effect—
Sample standard deviation (s)—
—

—

Variance—
Mean—
Count (n)
—

Values used

Sum (Σx)
—

Total of all values

Sum of squares (SS)
—

Σ(x − mean)²

Coefficient of variation
—

SD ÷ |mean| × 100

Standard error of mean
—

SD ÷ √n

95% CI for the mean
—

—

Your data against a normal curve

The curve is a normal distribution with your mean and standard deviation; dots are your values. The shaded band is one standard deviation either side of the mean.

—

Step-by-step working

—

—
    #Value (x)Deviation (x − mean)Squared deviation
    —

    Population vs sample standard deviation

    The two formulas differ only in the divisor. The sample version divides by n − 1 so that the variance estimate is not biased low when the mean is itself estimated from the same data.

    Population SD (σ) divisor N

    Use when your list is every member of the group you care about — every employee, every unit in a batch.

    σ = √[ Σ(xᵢ − μ)² ÷ N ]

    Sample SD (s) Bessel-corrected, divisor n − 1

    Use when your list is a sample drawn from a larger population — the usual case in surveys and experiments.

    s = √[ Σ(xᵢ − x̄)² ÷ (n − 1) ]

    Why n − 1? Deviations are measured from the sample mean, which sits closer to the data than the true population mean does, so Σ(x − x̄)² tends to be smaller than Σ(x − μ)². Dividing by n − 1 instead of n corrects that on average: the sample variance s² is then an unbiased estimator of σ². (The square root s is still very slightly biased for small n.)

    Symbols glossary

    What each symbol on this page means.

    SymbolNameMeaning
    sSample standard deviationSquare root of the sample variance (divisor n − 1).
    σPopulation standard deviationSquare root of the population variance (divisor N).
    x̄ , μSample mean, population meanThe arithmetic average of the values.
    n , NSample size, population sizeHow many values there are.
    SSSum of squaresΣ(x − mean)², the total squared distance from the mean.
    CVCoefficient of variationStandard deviation as a percentage of the mean; compares spread across different scales.
    SEStandard error of the means ÷ √n — how much a sample mean is expected to vary.

    Worked example: checking a batch of ball bearings

    Eight bearings are measured (mm): 25.002, 25.008, 24.996, 25.004, 25.000, 24.998, 25.006, 25.002. How consistent is the process? (Load this data from the examples menu to see it above.)

    1. 1

      Mean

      Add the eight values and divide by 8.

      x̄ = 200.016 ÷ 8 = 25.002 mm
    2. 2

      Squared deviations

      Deviations are 0, +0.006, −0.006, +0.002, −0.002, −0.004, +0.004, 0.

      Σ(x − x̄)² = 0.000112
    3. 3

      Sample variance and SD

      The bearings are a sample from a production run, so divide by n − 1 = 7.

      s² = 0.000112 ÷ 7 = 0.000016 → s = 0.004 mm

    Where standard deviation is used

    Any time you need to describe how spread out measurements are, not just where their centre is.

    Quality control

    Process capability and control charts compare the standard deviation of a measurement with the tolerance the part must meet.

    Consistency of a process

    Finance

    The standard deviation of an asset's returns is a common volatility measure and the risk axis in mean–variance analysis.

    Volatility & risk

    Research & medicine

    Studies report results as mean ± SD to show how much individuals differ, and use the SD to plan sample sizes.

    Describing variability

    What is standard deviation?

    Standard deviation measures how far values typically sit from their mean. A small standard deviation means the values cluster tightly around the average; a large one means they are spread out. It is expressed in the same units as the data, which is why it is used more often than variance.

    How to calculate standard deviation

    • Find the mean of the values.
    • Subtract the mean from each value and square the result.
    • Add the squares to get the sum of squares (SS).
    • Divide SS by n − 1 (sample) or N (population) to get the variance.
    • Take the square root of the variance.

    By Suhaib Hassan · Reviewed 28 September 2026 · How CalculatePilot verifies formulas →

    The 95% confidence interval for the mean

    For a sample, the interval is x̄ ± t × s ÷ √n, where t is the Student t critical value with n − 1 degrees of freedom (2.262 for n = 10). It is shown only for the sample setting, because a population mean is known exactly and needs no interval.

    Sources

    Frequently asked questions

    Why do we divide by n − 1 for a sample?

    Because the deviations are measured from the sample mean rather than the unknown true mean, the raw sum of squares runs low. Dividing by n − 1 (Bessel's correction) makes the sample variance an unbiased estimate of the population variance.

    What is the difference between standard deviation and standard error?

    Standard deviation describes the spread of individual values. Standard error of the mean, s ÷ √n, describes how much the sample mean itself would vary from sample to sample, so it shrinks as the sample grows while the standard deviation does not.

    How much do outliers affect standard deviation?

    A great deal, because deviations are squared. One extreme value can inflate the standard deviation substantially. If outliers are a concern, compare it with the interquartile range, which is far less sensitive.

    Can standard deviation be negative?

    No. It is the square root of a sum of squares, so it is zero or positive. It is zero only when every value is identical.

    Should I choose sample or population?

    Choose population only if your list contains every member of the group you are describing. If it is a sample used to learn about a larger group, choose sample. When in doubt, sample is the standard choice.

    What does the coefficient of variation tell me?

    It expresses the standard deviation as a percentage of the mean, so you can compare the relative spread of data measured on different scales. It is only meaningful when the mean is not close to zero and the data is on a ratio scale.

    Related statistics calculators

    Continue your analysis.

    All Math Calculators

    Embed This Standard Deviation Calculator

    Free and responsive, and it runs in the visitor's browser. Branding removal from $7.99/month.

    <iframe src="https://www.calculatepilot.com/embed/standard-deviation-calculator.html" width="100%" height="560" loading="lazy" title="Standard Deviation Calculator"></iframe>
    For website owners

    Want this calculator on your own website?

    Embed it in one line of code. Keep it free with a small CalculatePilot attribution link, or go white-label: your brand, no attribution, one license for all your domains.

    • All 159 calculators, unlimited embeds
    • Works on WordPress, Webflow, Squarespace, Wix and plain HTML
    • Runs in your visitor's browser, so nothing is sent to a server
    • License key emailed automatically after checkout, cancel anytime
    $7.99 / month
    or $89.99 / year · white-label Pro
    Get the white-label license Embed free with attribution