Skip to content

Standard Deviation Calculator

Sample or population, said out loud rather than picked for you.

Calculate standard deviation, variance, mean, median, mode and quartiles from a list of numbers, with the sample and population figures both shown.

Written and maintained by Mohit PatelLast checked August 4, 2026How we build these
Is this a sample or the whole population?

Dividing by n − 1, which is what you want almost always. A sample’s own mean sits closer to the sample than the true mean does, so dividing by n would understate the spread of the wider group the data came from. The correction is called Bessel’s.

Sample standard deviation2.1381variance 4.5714
Count
8
Sum
40
Mean
5
Median
4.5
Minimum
2
Maximum
9
Range
7
Q1
4
Q3
5.5
Interquartile range
1.5
Mode
4
Both figures, for comparison
Sample (n − 1)2.1381
Population (n)2

The gap between them shrinks as the dataset grows. At 8 values it is 6.9%; past a few hundred it stops mattering, which is why the distinction is easy to forget and easy to get wrong on small data.

How the Standard Deviation Calculator works

Paste numbers separated however you like and get the whole descriptive set: standard deviation, variance, mean, median, mode, range and quartiles. The choice that decides whether the answer is right is sample against population, so it is a visible toggle with both figures shown side by side rather than a decision made quietly on your behalf.

Also known as: variance calculator · sample standard deviation · population standard deviation · mean median mode calculator · sd calculator

Frequently asked questions

Sample or population, which do I want?

Sample, almost always. Use the population figure only when your numbers are genuinely everything you are describing, such as the marks of every student in one class. A survey, a batch of measurements or a month of readings is a sample of something larger, even when it does not feel like one.

Why does the sample version divide by n minus 1?

Because a sample's own mean sits closer to that sample than the true mean of the wider group does, so the squared deviations come out too small. Dividing by n minus 1 instead of n compensates. It is called Bessel's correction, and it matters most on small datasets: the gap between the two figures shrinks as the count grows and is negligible past a few hundred values.

How are the quartiles worked out?

By linear interpolation, which is what Excel's QUARTILE function and NumPy's percentile default both use. There are nine recognised definitions of a quartile and they disagree on small datasets, so matching the two tools people are most likely to check against is the useful choice.

What if no number repeats?

Then there is no mode and the page says so, rather than reporting the first value or the lowest. If several values tie for the most frequent, all of them are shown.

How do I paste my data?

However it comes. Commas, spaces, semicolons and line breaks all work, so a column copied out of a spreadsheet pastes straight in. Anything that is not a number is skipped rather than counted as zero, which is the behaviour that quietly ruins an average.

Related calculators