Standard Deviation Calculator

Find the sample or population standard deviation and variance of any list of numbers, plus the mean, median, standard error and a full table of working.

Standard deviation calculator
The data is a

    Working

    xx − mean(x − mean)²

    Sample standard deviation divides by n − 1 (Bessel's correction); population standard deviation divides by n. Results are rounded to 6 decimal places. The working table shows up to 50 values.

    On this page

    A standard deviation calculator measures how spread out a set of numbers is around its average, and shows the variance, mean, median, range, standard error and coefficient of variation, with a full table of working. Paste or type your data, choose whether it’s a sample or a whole population, and the calculator does the rest.

    For example, the numbers 2, 4, 4, 4, 5, 5, 7 and 9 have a mean of 5. Treated as a whole population, their standard deviation is exactly 2. Treated as a sample, it’s 2.13809, slightly larger because a sample usually underestimates the true spread. Test scores of 85, 90, 78, 92 and 88 have a sample standard deviation of about 5.4589 around their mean of 86.6.

    How to use the standard deviation calculator

    1. Enter your numbers, separated by commas, spaces or new lines. You can paste a column straight from a spreadsheet.
    2. Choose Sample if your data is a selection from a larger group, or Whole population if it includes every member of the group you care about.
    3. Press Calculate to see the standard deviation, the related statistics and a table showing each step.

    What standard deviation tells you

    Standard deviation is the typical distance between the values and their mean. A small standard deviation means the values sit close to the average; a large one means they’re spread out. Two classes can have the same average test score of 70, but if one has a standard deviation of 3 and the other 15, the first class scored much more consistently.

    Because it’s in the same units as the data, standard deviation is easy to interpret: a standard deviation of 5.46 points on a test means scores typically sit about five or six points away from the average.

    How to calculate standard deviation

    1. Find the mean: add the values and divide by how many there are. For 2, 4, 4, 4, 5, 5, 7, 9, the sum is 40 and the mean is 40 ÷ 8 = 5.
    2. Find each deviation: subtract the mean from each value: −3, −1, −1, −1, 0, 0, 2, 4.
    3. Square the deviations: 9, 1, 1, 1, 0, 0, 4, 16.
    4. Add them up: the sum of squares is 32.
    5. Divide to get the variance: by n (8) for a population, giving 4, or by n − 1 (7) for a sample, giving about 4.5714.
    6. Take the square root: √4 = 2 for the population, or √4.5714 ≈ 2.1381 for the sample.

    The formulas

    Population: σ = √( Σ(x − μ)² ÷ N )

    Sample: s = √( Σ(x − x̄)² ÷ (n − 1) )

    Here μ or x̄ is the mean, N or n is the number of values, and Σ means “add up”.

    Sample or population?

    Use the population formula when your data includes every member of the group, such as the heights of all 25 pupils in one class when that class is all you’re interested in. Use the sample formula when your data is a subset used to estimate a larger group, such as 25 pupils chosen to represent a whole country. Dividing by n − 1 instead of n, known as Bessel’s correction, makes the sample estimate unbiased; without it, samples would tend to understate the true variability. In practice, most real-world data is a sample, and most statistical software uses the sample formula by default.

    Variance

    Variance is the square of the standard deviation: the average squared distance from the mean. It’s used in many statistical formulas because variances add neatly, but it’s in squared units, so standard deviation is easier to interpret. For the example data, the population variance is 4 and the standard deviation is 2.

    The 68-95-99.7 rule

    For data that follows a normal (bell-shaped) distribution, about 68% of values lie within one standard deviation of the mean, about 95% within two, and about 99.7% within three. If adult heights in a population have a mean of 170 cm and a standard deviation of 7 cm, about 68% of people are between 163 and 177 cm, and about 95% are between 156 and 184 cm. The calculator shows what share of your own values falls within one standard deviation, which helps you see how closely your data matches this pattern.

    Other statistics shown

    • Standard error of the mean: the standard deviation divided by √n. It estimates how much the sample mean would vary between samples, and it shrinks as the sample grows.
    • Coefficient of variation: the standard deviation as a percentage of the mean. It lets you compare variability between data sets with different units or scales.
    • Median and range: the middle value and the gap between the smallest and largest values, simple measures of centre and spread.

    Comparing two data sets

    Standard deviation is most useful when you compare groups. Suppose two small groups of students both average 70 on a test. Group A scored 68, 70 and 72, a sample standard deviation of 2. Group B scored 55, 70 and 85, a sample standard deviation of 15. The averages are identical, but group B’s results are far less consistent: some students struggled while others excelled. A teacher would respond very differently to each group, even though the mean alone hides the difference.

    How outliers affect standard deviation

    Because each deviation is squared, a single extreme value can change the result dramatically. Adding one value of 50 to the example data 2, 4, 4, 4, 5, 5, 7, 9 moves the mean from 5 to 10 and raises the population standard deviation from 2 to about 14.27. Before drawing conclusions, check whether an outlier is a genuine observation or a typing or measurement error. When data contains genuine extreme values, measures such as the median and interquartile range can describe it more robustly.

    Standard deviation in finance

    Investors use standard deviation to measure volatility. A fund whose yearly returns have a standard deviation of 4% is much steadier than one with a standard deviation of 18%, even if both average 7% a year. Higher volatility means a wider range of likely outcomes, both good and bad, so it’s often used as a simple measure of risk.

    Where standard deviation is used

    • Education: comparing the spread of test scores and standardising results.
    • Finance: measuring the volatility, or risk, of investment returns.
    • Manufacturing and quality control: checking that products stay within tolerance, as in Six Sigma.
    • Science and medicine: reporting the variability of measurements and the precision of experiments.
    • Sport: judging how consistent a player’s performance is.
    • Weather and climate: describing how much temperatures or rainfall vary from the average.

    Standard deviation in spreadsheets

    In Excel and Google Sheets, STDEV.S gives the sample standard deviation and STDEV.P gives the population standard deviation. VAR.S and VAR.P give the matching variances. The calculator’s results match these functions, so you can use it to check a spreadsheet.

    Tips

    • Check your data for typing mistakes; a single wrong value can change the standard deviation dramatically.
    • Outliers have a big effect because deviations are squared. Consider whether they’re genuine before removing them.
    • Always state whether you used the sample or population formula when reporting results.

    Related calculations

    You may also find the sample size calculator useful to find how many survey responses you need, while the statistics calculator lets you get a full statistical summary of any data set.

    Frequently asked questions

    Find the mean, subtract it from each value, square the results, add them up, divide by n (population) or n − 1 (sample), and take the square root.

    Population standard deviation divides by n; sample standard deviation divides by n − 1 to correct for estimating from a sample. For 2, 4, 4, 4, 5, 5, 7, 9 they are 2 and about 2.138.

    The values are widely spread around the mean. A low standard deviation means they're clustered close to it.

    Standard deviation is the square root of variance. A variance of 4 means a standard deviation of 2.

    Use population if your data covers every member of the group you're studying; use sample if it's a subset used to estimate a larger group. Most real data is a sample.

    In a normal distribution, about 68% of values lie within one standard deviation of the mean, 95% within two and 99.7% within three.

    The standard deviation divided by the square root of the number of values. It measures how precisely the sample mean estimates the true mean.

    No. It's a square root of a sum of squares, so it's always zero or positive. It's zero only when all values are the same.

    Strongly, because deviations are squared. Adding a value of 50 to 2, 4, 4, 4, 5, 5, 7, 9 raises the population standard deviation from 2 to about 14.27.

    Yes. Scores of 68, 70, 72 and 55, 70, 85 both average 70, but their sample standard deviations are 2 and 15.

    Up to 10,000 values. The working table shows the first 50, but every value is included in the calculation.