Standard Deviation Calculator
Enter your numbers, say whether they are a population or a sample, and get the standard deviation with the full working, the margin of error at every confidence level, and a frequency table.
Example
This is a sample result, not your calculation. Enter your own values to replace it.
Enter your numbers, say whether they are a population or a sample, then calculate.
Standard Deviation, σ: —
- Count, N:
- —
- Sum, Σx:
- —
- Mean, μ:
- —
- Variance, σ²:
- —
Steps
Margin of Error (Confidence Interval)
The sampling mean most likely follows a normal distribution, so the standard error of the mean is the standard deviation divided by the square root of the count:
These are the margins of error at each confidence level. Depending on the field, 95% is the level usually reported.
| Confidence Level | Margin of Error | Error Bar |
|---|
Frequency Table
| Value | Frequency |
|---|
Check your numbers
How to use this calculator
- Type or paste your numbers, separated by commas, spaces or line breaks.
- Say whether they are a population (the whole group) or a sample (a subset of a larger one). This changes the divisor, and therefore the answer.
- Press Calculate. After the first result the figures update as you edit, so fixing a typo does not mean starting again.
What you get back
- The standard deviation, with the count, sum, mean and variance beneath it.
- The working — the formula, the squared deviations, the division and the square root, so you can check each step rather than trust the answer.
- The margin of error at eight confidence levels, with error bars drawn to scale.
- A frequency table showing how often each value appears.
Population or sample?
A population is every member of the group you are describing; a sample is a subset standing in for a larger group you cannot measure. A sample tends to underestimate the true spread, because the values you happened to draw sit closer to their own mean than to the population's. Dividing by n − 1 instead of n — Bessel's correction — compensates, which is why the sample figure is always the larger of the two. Most real data sets are samples.
The method, step by step
- Find the mean: add the values and divide by how many there are.
- Subtract the mean from each value and square the result, so distances above and below the mean both count as spread.
- Add those squares up — that is Σ(xi − μ)².
- Divide by N for a population, or n − 1 for a sample. That is the variance.
- Take the square root, which brings the answer back into the units you started with. That is the standard deviation.
A worked example you can check
For 10, 12, 23, 23, 16, 23, 21, 16 as a population: the sum is 144 and the mean is 18. The squared deviations add to 192, so the variance is 192 ÷ 8 = 24 and the standard deviation is √24 = 4.8989794855664. Treat the same numbers as a sample and only the divisor changes — 192 ÷ 7 = 27.428571428571, giving 5.2372293656638.
Reading the margin of error
Your mean is an estimate of a true mean you cannot see. The standard error of the mean — the standard deviation divided by the square root of the count — measures how precise that estimate is; for the example above it is 1.7320508075689. Multiply it by the figure for a confidence level to get the margin of error: at 95% that is 1.960 standard errors, or 18 ±3.395. Higher confidence buys a wider interval, which is why the bars lengthen down the table.
Variance and standard deviation
Variance is the standard deviation before the square root, and lives in squared units — squared pounds, squared seconds — which is why it is hard to interpret directly. The square root brings it back to the units of the data, so a standard deviation of 4.9 marks is a distance you can picture on the same scale as the marks themselves.
Related tools
Want the median, quartiles and the rest of the descriptive summary too? The statistics calculator returns the whole table, and the percentage calculator handles shares and changes.
Read more
Frequently asked questions
What is standard deviation?
Standard deviation measures how spread out a set of numbers is around the mean. A low value means the data points cluster close to the average; a high value means they are more dispersed. It is the square root of the variance, expressed in the same units as the data.
How do I calculate standard deviation step by step?
Find the mean of the data; subtract the mean from each value and square the result; add up those squared differences; divide by N for a population or N−1 for a sample to get the variance; then take the square root. That square root is the standard deviation.
What is the difference between sample and population standard deviation?
Population standard deviation (σ) divides by N and is used when your data is the entire group. Sample standard deviation (s) divides by N−1 (Bessel's correction) and is used when your data is a sample estimating a larger population — it gives a less biased estimate and is the more common case.
How do I calculate standard deviation in Excel?
Use =STDEV.S(range) for a sample or =STDEV.P(range) for a population, pointing at the cells that hold your numbers. The matching variance functions are =VAR.S and =VAR.P, and =AVERAGE gives the mean. This calculator shows all of them at once so you can check your spreadsheet.
What is variance?
Variance is the average of the squared differences from the mean — standard deviation before you take the square root. It is in squared units, which is why standard deviation (the square root) is usually easier to interpret.
Should I choose Population or Sample?
Choose Population when your numbers are every member of the group you care about — every pupil in a class, every reading you took. Choose Sample when they are a subset standing in for a larger group you cannot measure. It is not a display setting: a population divides the squared deviations by N, a sample divides by n − 1, so the sample figure is always the larger of the two. When in doubt, most real data sets are samples.
What is the margin of error, and why is it shown?
The mean you calculated is an estimate of the true mean, and the standard error of the mean (the standard deviation divided by the square root of the count) says how precise that estimate is. Multiplying it by the figure for a confidence level gives the margin of error: at 95% the true mean is expected to lie within about 1.960 standard errors of yours. The table shows every level, and the error bars draw them to scale.
What does the frequency table show?
How many times each distinct value appears, and what share of the data set that is. It is the quickest way to spot a repeated reading, a typo you entered twice, or a data set that is far less varied than its standard deviation suggests.
What counts as a high or low standard deviation?
It is relative to the mean and the context. The same standard deviation can be large for small numbers and tiny for large ones, so analysts often compare the coefficient of variation (standard deviation ÷ mean) to judge spread across different data sets.
Related calculators
- Scientific Calculator A free online scientific calculator with trigonometry, logarithms, powers, roots, factorials, memory and constants — works on any device.
- Percentage Calculator Calculate percentages, percentage change and percent-of quickly.
- Fraction Calculator Add, subtract, multiply and divide fractions with steps.
- Statistics Calculator Calculate mean, median, mode, range, variance, standard deviation and quartiles from a data set, with a full five-number summary.
- Triangle Calculator Calculate a triangle's area, perimeter, angles and classification from three side lengths.
- Random Number Generator Generate random numbers within a range, with options for uniqueness.
About this calculator
Method reviewed for accuracy on July 25, 2026
Built on transparent, unit-tested formulas that run entirely in your browser — see how we build our calculators.
Embed this calculator on your site — free
Add this free, mobile-friendly Standard Deviation Calculator to your own website. Paste the code where you want it to appear — it stays up to date automatically, and the frame resizes to fit.
Please keep the attribution link — it's what keeps these tools free to use and embed.