Standard Deviation Calculator
Paste a dataset — get the mean, variance, standard deviation, a frequency table and confidence intervals with error-bar visuals.
What does standard deviation measure?
Standard deviation is a single number that summarises how spread out a dataset is around its mean. A small standard deviation means the values huddle tightly around the average; a large one means they're scattered. It has the same units as your data — a standard deviation of 3 cm on a set of heights is 3 cm, not "3 units squared".
Two datasets can share the same mean and look completely different: A = [48, 49, 50, 51, 52] has mean 50 with σ ≈ 1.41, while B = [10, 30, 50, 70, 90] has the same mean 50 but σ ≈ 28.28. The mean tells you where the center is; the standard deviation tells you how far a typical value sits from that center.
Standard deviation explained, step by step
Each step below has a plain-English definition, its formula (with every symbol spelled out), a small diagram, and a worked example — all in one card, so you can follow the whole pipeline from raw data → mean → variance → standard deviation → confidence interval without jumping between sections.
1. Deviations from the mean
First compute the mean, then measure how far each value sits from it: dᵢ = xᵢ − μ. Points below the mean give negative deviations, points above give positive ones. Signed deviations always sum to zero — which is exactly why we can't average them raw.
2. Square each deviation
To get rid of the sign problem, square every deviation. Now every term is positive, and points further from the mean contribute much more than nearby ones — that's what makes SD sensitive to outliers.
3. Divide → variance (population vs sample)
Variance is the average squared deviation. Divide by N for a whole population; divide by N − 1 for a sample (Bessel's correction), because the sample mean sits a hair too close to its own data.
4. Take the square root → standard deviation
Variance is in squared units (cm², $²…). Take a square root to bring it back to the original units — that's the standard deviation. A value of σ = 5 cm on heights literally means about 5 cm spread from average.
5. Standard error of the mean (SEM)
SD describes how spread the individual values are. SEM describes how much the sample mean itself bounces from sample to sample. It shrinks with the square root of N — quadruple your sample and SEM halves.
6. Margin of error and confidence intervals
Multiply SEM by a z-score to get the half-width of a confidence interval around the mean. Higher confidence needs a bigger z, so the interval widens: 95% uses z ≈ 1.96, 99% uses z ≈ 2.58.
Common z-multipliers
| Confidence level | z | Roughly means |
|---|---|---|
| 68.3% | 1.000 | ±1 standard error |
| 90% | 1.645 | commonly used, tighter interval |
| 95% | 1.960 | the default in most research |
| 99% | 2.576 | stricter, wider interval |
| 99.9% | 3.291 | very high confidence |
Common mistakes
- Using the population formula on a random sample — under-estimates the true spread. Prefer N − 1 when in doubt.
- Reporting variance and calling it standard deviation. Variance is in squared units (e.g. cm²) — always take the square root for a meaningful "spread" figure.
- Comparing standard deviations across variables in different units. Use the coefficient of variation (s / mean) for a fair comparison.
- Treating a confidence interval as "95% probability the true mean is in this range for this specific sample". It's a statement about the procedure, not a probability about this one interval.
Features of this calculator
- Accepts comma, space, semicolon, tab or newline separated data — paste directly from a spreadsheet.
- Toggle between population (N) and sample (N − 1) formulas — the result updates the correct denominator and symbol.
- Frequency table with counts and percentages so repeated values are easy to spot.
- Confidence-interval table at 68.3%, 90%, 95%, 99% and 99.9% with proportional error-bar visuals that grow as confidence increases.
- Full step-by-step working: mean → each (xᵢ − mean)² → sum → variance → square root.
Frequently asked questions
+Can standard deviation be negative?
No. It's the square root of a sum of squares, so it's always ≥ 0. A standard deviation of exactly 0 means every value in the dataset is identical.
+Why do the 68%, 95%, 99.7% rules exist?
For any dataset that's roughly bell-shaped (normally distributed), about 68% of values fall within ±1σ of the mean, about 95% within ±2σ and about 99.7% within ±3σ.
+How does sample size affect the margin of error?
Margin of error scales with 1/√N, so quadrupling the sample size cuts the margin roughly in half.