How to use this calculator
- Paste or type your numbers, separated by commas, spaces or new lines. You can paste a column straight from a spreadsheet. Don’t use commas as thousands separators: write 1200, not 1,200.
- Choose whether your data is a sample or the whole population (see below if you’re not sure).
- Optionally, open More options to change the confidence level used for the margin of error.
Anything that isn’t a number, such as a stray letter or a header, is skipped and listed in a note so you can fix it. The results show the standard deviation, variance, mean, count, sum, standard error and margin of error. The step-by-step working and a value-by-value table of deviations follow underneath.
The standard deviation formulas
For a sample of n values with mean x̄:
For a whole population with mean μ, divide by n instead:
In words: find the mean, subtract it from every value, square those deviations so negatives don’t cancel positives, add them up, divide, and take the square root to return to the original units. The quantity before the square root is the variance.
Worked example
Take the eight values 10, 12, 23, 23, 16, 23, 21, 16 as a sample.
- Count and sum: n = 8, and the values add up to 144.
- Mean: 144 ÷ 8 = 18.
- Deviations: subtract 18 from each value and square the result. For example, (10 − 18)² = 64 and (12 − 18)² = 36. The eight squared deviations are 64, 36, 25, 25, 4, 25, 9 and 4.
- Sum of squares: 64 + 36 + 25 + 25 + 4 + 25 + 9 + 4 = 192.
- Variance: 192 ÷ (8 − 1) ≈ 27.4286.
- Standard deviation: √27.4286 ≈ 5.2372.
If the same eight values were an entire population, you’d divide by 8 instead: the variance would be exactly 24 and σ ≈ 4.899.
The standard error of the mean is 5.2372 ÷ √8 ≈ 1.8516. With 7 degrees of freedom, the 95% t value is 2.365, so the margin of error is about ±4.3784. A 95% confidence interval for the mean runs from about 13.62 to 22.38.
Sample or population?
The choice depends on what you want the number to describe, not on how much data you have.
- Population: your list is the complete group, and you only want to describe that group. Examples: the ages of everyone on your team, or this month’s daily sales figures if you only care about this month.
- Sample: your list is part of a bigger group you want to draw conclusions about. Examples: 50 surveyed customers out of thousands, ten parts pulled from a production run, or a year of returns used to judge an investment’s typical volatility.
When in doubt, use the sample version. It gives a slightly larger answer, and the gap shrinks quickly as n grows. In the example above it’s 5.2372 versus 4.899.
Critical t values for the margin of error
For a small sample, the margin of error uses Student’s t distribution rather than the normal distribution, because the standard deviation is itself estimated from the data. These are the two-sided critical values the calculator uses:
| Values (n) | Degrees of freedom | 90% | 95% | 99% |
|---|---|---|---|---|
| 2 | 1 | 6.314 | 12.706 | 63.657 |
| 3 | 2 | 2.920 | 4.303 | 9.925 |
| 5 | 4 | 2.132 | 2.776 | 4.604 |
| 6 | 5 | 2.015 | 2.571 | 4.032 |
| 10 | 9 | 1.833 | 2.262 | 3.250 |
| 15 | 14 | 1.761 | 2.145 | 2.977 |
| 20 | 19 | 1.729 | 2.093 | 2.861 |
| 30 | 29 | 1.699 | 2.045 | 2.756 |
| 50 | 49 | 1.677 | 2.010 | 2.680 |
| 100 | 99 | 1.660 | 1.984 | 2.626 |
As the sample grows, t approaches the familiar z values of 1.645, 1.96 and 2.576. With only a handful of values, the margin of error is wide, and the calculator adds a note to say so.
Interpreting your result
- Compare it to the mean. An SD of 5 means a lot when the mean is 18 and very little when the mean is 1,800. The coefficient of variation (SD ÷ mean) puts spreads on a common scale.
- The 68–95–99.7 rule applies only to roughly bell-shaped data. In that case, about 68% of values fall within one SD of the mean, 95% within two and 99.7% within three. For skewed data, such as incomes, this doesn’t hold.
- Outliers have a big effect. Because deviations are squared, one extreme value can inflate the SD a lot. Check the table for any row with a squared deviation far larger than the rest.
- Zero means no spread. If every value is identical, the standard deviation is 0.
To see the mean, median and mode side by side, use the average calculator.
How the calculation is done
The calculator uses the two-pass method: it computes the mean first, then sums the squared deviations from it. This avoids the precision loss of the “sum of squares minus square of sums” shortcut, which can go badly wrong for values like 1,000,000,004 and 1,000,000,007. Sums use compensated addition, and tiny floating-point leftovers are cleaned up before display, so 0.1, 0.2 and 0.3 give a mean of exactly 0.2 and a standard deviation of exactly 0.1. Results show up to 4 decimal places.
Sources
- NIST/SEMATECH e-Handbook of Statistical Methods: Measures of Scale
- NIST/SEMATECH e-Handbook of Statistical Methods: Critical Values of the Student’s t Distribution
Frequently asked questions
What does standard deviation tell you?
It measures how spread out values are around their mean, in the same units as the data. A small standard deviation means most values sit close to the average; a large one means they're widely scattered. Two classes can both average 75% on a test, but one with an SD of 3 points is far more consistent than one with an SD of 15.
Should I use sample or population standard deviation?
Use the population version only when your list contains every member of the group you care about, such as the scores of every student in one class. If your numbers are a subset used to describe a larger group, which is the usual case in surveys, experiments and quality checks, use the sample version.
Why does the sample standard deviation divide by n − 1?
A sample's values are, on average, closer to their own mean than to the true population mean, so dividing by n would underestimate the spread. Dividing by n − 1, known as Bessel's correction, makes the sample variance an unbiased estimate of the population variance. The difference matters most for small samples.
What's the difference between standard deviation and standard error?
Standard deviation describes the spread of individual values. Standard error (SD ÷ √n) describes how precisely the sample mean estimates the true mean. Standard error shrinks as you collect more data; standard deviation doesn't.
How is the margin of error calculated here?
For a sample, it's the critical value from Student's t distribution (with n − 1 degrees of freedom) times the standard error. For 8 values at 95% confidence, t is 2.365. For the population option the calculator uses the normal distribution's z value, 1.96 at 95%.
What's the relationship between variance and standard deviation?
Variance is the average squared deviation from the mean, and standard deviation is its square root. Variance is in squared units (such as dollars squared), which is hard to interpret, so the standard deviation is usually the figure people report.
Updated November 2026. Results are estimates for educational purposes and depend on the inputs you provide.