How to use the standard deviation calculator
- Choose what your data looks like: a list of numbers, values with how many times each occurs, or a probability table.
- Type or paste it in. A column copied from a spreadsheet works as it is; in a table, put each value and its count or probability on its own line.
- Say whether a list or table is a sample from a larger group or the whole population. The answer at the top follows your choice, and the table under it shows both.
- Read the chart and the share of your data within 1, 2 and 3 standard deviations, the confidence intervals for the mean, and the working step by step.
What the standard deviation tells you
The standard deviation measures how spread out numbers are around their mean. A small standard deviation means most values sit close to the average; a large one means they are scattered widely. Two classes can both average 70 on a test, but if one has a standard deviation of 3 points and the other of 15, the first class scored far more evenly. It is the most common way to describe spread because it is in the same units as the data: a standard deviation of a set of heights in centimeters is itself in centimeters.
The NIST/SEMATECH e-Handbook of Statistical Methods, from the US National Institute of Standards and Technology, describes the variance as roughly the arithmetic average of the squared distance from the mean, and notes that squaring gives more weight to values far from the mean: a point 2 units away adds 4 to the sum, while one 10 units away adds 100. The standard deviation is the square root of the variance, which, in the handbook’s words, restores the units of the spread to the original data units.
The formulas
For a sample of n values with mean x̄, NIST gives the variance and standard deviation as
s² = Σ(xᵢ − x̄)² ÷ (n − 1)
s = √s²
For a whole population of N values with mean μ, the sum is divided by N instead: σ = √( Σ(xᵢ − μ)² ÷ N ). Dividing a sample by n − 1 corrects for the fact that a sample’s values sit a little closer to their own mean than to the true mean of the whole group, so dividing by n would understate the spread.
With a frequency table, each squared distance counts as many times as its value occurs: s² = Σf·(x − x̄)² ÷ (n − 1), where n is the counts added up. For grouped data in classes such as 20–30, each class is taken at its midpoint, so the answer is an estimate of the spread of the raw values. For a probability distribution, the mean is the expected value μ = Σx·p and the variance is σ² = Σp·(x − μ)².
A worked example from Excel’s help
Microsoft’s help pages for STDEV.S and STDEV.P use the breaking strength of ten tools: 1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299. Press “Breaking strength” above to load them.
- The ten values add up to 13,286, so the mean is 1328.6.
- Square each value’s distance from the mean and add them up: the sum of squares is 6788.4.
- As a sample, divide by n − 1 = 9 and take the square root: s = 27.46391572, the same as the 27.46391572 Microsoft’s page gives for STDEV.S.
- As a whole population, divide by N = 10 instead: σ = 26.05455814, matching the 26.05455814 Microsoft gives for STDEV.P, “assuming only 10 tools are produced”.
Microsoft’s remarks say that STDEV.S assumes its arguments are a sample of the population and uses the “n-1” method, that STDEV.P assumes they are the entire population and uses the “n” method, and that for large sample sizes the two return approximately equal values.
Sample or population?
If you measured every member of the group you want to describe, such as all the employees of a small company or every game a team played this season, use the population standard deviation. If your numbers are a sample, such as 50 customers surveyed out of thousands, and you want to estimate the spread of the whole group, use the sample standard deviation. Software names them differently: in Excel, STDEV.P is the population version and STDEV.S the sample version; in Python’s statistics module they are pstdev and stdev.
The 68–95–99.7 rule and Chebyshev’s inequality
In a normal, bell-shaped distribution, about 68.27% of values lie within one standard deviation of the mean, 95.45% within two and 99.73% within three. Real data is often not normal, so the calculator counts how much of your data actually falls in each range and shows it next to the normal shares. Chebyshev’s inequality gives a floor that holds for any data at all: at least 75% of values lie within two standard deviations and at least 88.9% within three. If your data has far less within one standard deviation than 68%, or a few values beyond three, it is skewed or has outliers, and the median and interquartile range from the average calculator may describe it better.
Standard error and confidence intervals
The standard error of the mean, s ÷ √n, describes how precisely a sample mean estimates the true mean; it shrinks as the sample grows. NIST’s handbook defines the confidence limits for the mean as x̄ ± t × s ÷ √n, where t is the 100(1 − α/2) percentile of the t distribution with n − 1 degrees of freedom. The calculator shows the interval at 80% to 99.9% confidence. Using t rather than the normal value 1.96 matters for small samples: with 8 values, t at 95% confidence is 2.365, so the interval is about 21% wider. For a full interval tool with proportions and differences, see the confidence interval calculator.
z-scores
The last column of the step-by-step table is each value’s z-score: its distance from the mean in standard deviations, (x − mean) ÷ standard deviation. A z-score of 2 means the value is two standard deviations above the mean; −0.5 means half a standard deviation below. The z-score calculator turns z-scores into percentiles and probabilities.
Accuracy
Numbers are read exactly as typed, as decimals, and the sums are done in exact whole-number arithmetic before the final division and square root. So the calculator stays accurate where a shortcut formula fails, such as values like 10000000.1 and 10000000.2 that differ only in their last digits. NIST publishes nine Statistical Reference Datasets with certified values for testing exactly this, from “lower” to “higher” difficulty. On all nine, this calculator’s mean and standard deviation agree with the certified values to 15 significant digits, about the most an ordinary computer number holds. The “Large numbers” example is NIST’s NumAcc1 data set, whose certified standard deviation is exactly 1.
Your data stays on your device
Everything is worked out in your browser. Nothing you type is sent anywhere or stored.
Frequently asked questions
Should I use the sample or the population standard deviation?
Use the population standard deviation when your numbers are the whole group you care about, such as the scores of every student in one class. Use the sample standard deviation when your numbers are a sample used to estimate a larger group. It divides by n − 1 instead of n, which makes it slightly larger. When unsure, the sample version is the usual choice.
What is the difference between variance and standard deviation?
Variance is the average squared distance from the mean, so it is in squared units: square centimeters for lengths in centimeters. The standard deviation is its square root, which brings it back to the units of your data.
How do I find the standard deviation of a frequency table?
Choose “Values and counts” and enter each value and how many times it occurs on its own line, such as “3 12”. For grouped data, enter each class as a range, such as “20-30 5”; the calculator uses the class midpoints.
Can it find the standard deviation of a probability distribution?
Yes. Choose “A probability table” and enter each value with its probability as a decimal, a percent or a fraction such as 3/8. It finds the expected value μ, the variance and σ.
Why does my calculator or textbook give a slightly different answer?
Most often one of you used the sample formula (n − 1) and the other the population formula (N). Both are shown in the table under the answer. Rounding the mean before squaring the distances also changes the last digits; this calculator keeps every digit until the end.
How do I enter my numbers?
Type or paste them separated by spaces, commas, semicolons or new lines; a column copied from a spreadsheet works as it is. Write 1500 rather than 1,500, as a comma between numbers separates them.
Is anything I type sent anywhere?
No. Everything is worked out in your browser, and nothing you type is sent anywhere or stored.