Sample Standard Deviation Calculator
Compute sample standard deviation from your dataset. Get mean, variance, and s for data that represents a sample, not the whole population.
Enter the Details
Calculate the sample standard deviation of a set of numbers.
Enter numbers separated by comma , space or line break
Result will appear here...
What the sample standard deviation calculator does
The sample standard deviation measures how spread out your data is when those numbers are a sample, a smaller group standing in for a larger population. This calculator works it out from your data, along with the count of values used.
It is the version written with the letter s, and it divides by one less than the count. That small adjustment is the whole point of the sample version, and the section below explains why it is there.
How to use it
- Enter your numbers in the box, separated by commas, spaces, or line breaks.
- Press Calculate for the sample standard deviation, or Reset to clear it.
How the sample standard deviation is worked out
Four steps, the same as any standard deviation until the very end. Find the mean. For each number, measure its distance from the mean and square it. Add those squared distances and divide, this time by one less than the count. Take the square root to get back to your original units.
Sample standard deviation = √( sum of squared distances from the mean ÷ (n minus 1) )
Everything is ordinary except that last divide by n minus 1 rather than n. That is the sample version's signature, and the next section is about why it earns its place.
Why it divides by one less
When you only have a sample, you do not know the true average of the whole population, so you use the sample's own average instead. And your sample's numbers always sit a little closer to their own average than they would to the true one. That makes the squared distances come out slightly too small, so a spread calculated the ordinary way would understate the real spread.
Dividing by one less, n minus 1, nudges the result back up by just the right amount to cancel that bias, giving a better estimate of the population's spread. This adjustment is called Bessel's correction. It matters most for small samples, where the gap is largest, and fades away as the sample grows.
When your data is a sample
Use this calculator when your numbers are a subset drawn from a larger group you cannot measure in full. A hundred customers out of thousands. Fifty measurements meant to represent every part you will ever make. In these cases your data is a window onto a bigger population, and the sample standard deviation is the honest estimate of that population's spread.
If your numbers are instead the entire group, with nothing outside them, you want the population standard deviation, which divides by the full count. Our population standard deviation calculator handles that. When you are unsure which you have, the sample version is the safer choice, since most real data is a sample.
A worked example: eight numbers
Take the eight numbers 2, 4, 4, 4, 5, 5, 7, 9 as a sample. Their mean is 40 ÷ 8 = 5, and the squared distances from 5 add up to 32.
Dividing by one less than the count, so by 7 rather than 8, gives a variance of 32 ÷ 7 = 4.57, and the square root is a sample standard deviation of about 2.14. Had you treated the same numbers as a whole population and divided by 8, you would have got exactly 2. The sample figure is a little larger, which is Bessel's correction doing its job.
Entering your data, and the rounding
You can separate your numbers with commas, spaces, or line breaks, in any mix, and the order does not matter. You need at least two numbers for a sample standard deviation to mean anything, since the correction divides by one less than the count and a single value leaves nothing to divide by. The result is shown to several decimal places with trailing zeros trimmed.
Questions people ask
What is the sample standard deviation?
A measure of how spread out a sample of data is, found by taking the square root of the sum of squared distances from the mean divided by one less than the count. It estimates the spread of the larger population.
Why does it divide by n minus 1 instead of n?
Because a sample's values sit closer to their own average than to the true population average, so the spread comes out too small. Dividing by one less corrects that bias. This is Bessel's correction.
How is it different from the population standard deviation?
The sample version divides by n minus 1 and estimates a larger group's spread from a subset. The population version divides by the full count and is used when your data is the whole group.
Why do I need at least two numbers?
Because the calculation divides by one less than the count. With a single value that would mean dividing by zero, so a sample standard deviation is only defined for two or more numbers.
References
A quick note on where the methods here come from. The definition of the sample standard deviation, and the reason it divides by n minus 1, are set out in the NIST/SEMATECH e-Handbook of Statistical Methods, the US government's public statistics reference. OpenStax Introductory Statistics is a free, widely used textbook covering the same ground.
- NIST/SEMATECH e-Handbook of Statistical Methods (measures of spread, sample versus population). https://www.itl.nist.gov/div898/handbook/
- OpenStax, Introductory Statistics (measures of the spread of the data). https://openstax.org/details/books/introductory-statistics-2e
Ankit Khatiwada is a researcher and graduate student in Computer Science at Saarland University, with strengths in statistics, data analysis, data engineering, and full stack development. His work sits at the intersection of quantitative reasoning and applied technology, making him a strong fit for tools that depend on clear numerical logic. At Eon Tools, he reviews number and statistical tools.