Home / Blog / Standard Deviation
How-to · 2026

How to Calculate Standard Deviation in Excel

Measure how spread out your numbers are with one function — and get the one decision that actually matters right: sample or whole population.

By the Quiriz Team · Published July 24, 2026 · 4 min read

The quick answer: =STDEV.S(A2:A100) for a sample, =STDEV.P(A2:A100) for a whole population. The function is easy; the only real decision is which of those two to use. Here's how to get it right.

Use STDEV.S for a sample (the usual case)

Most of the time your data is a sample — a subset standing in for a bigger group (100 survey responses, last month's orders). Use =STDEV.S(range). It divides by n−1, which corrects the bias you get estimating a whole population from a sample.

Use STDEV.P for a whole population

Only when your range is everything — every student in the class, every transaction that exists, with nothing left out — use =STDEV.P(range). It divides by n. Pick this and it should genuinely be the full population, not a sample.

Why it matters

On a big dataset, STDEV.S and STDEV.P give nearly the same number. On a small one, the n−1 vs n difference is real — so the sample-vs-population choice can change your result noticeably. When in doubt, STDEV.S is the safer default.

The legacy STDEV (no suffix) still works and equals STDEV.S; STDEVP equals STDEV.P. Both text and blank cells in the range are ignored automatically.

Run the stats without the function names

Ask "what's the standard deviation of order value by region" in plain English — Quiriz picks the right calculation and answers. Free to start.

Try Quiriz free →

Frequently asked questions

Should I use STDEV.S or STDEV.P?
Use STDEV.S when your numbers are a sample drawn from a larger group (the usual case). Use STDEV.P only when the range is the entire population you care about — every value, with none left out. STDEV.S is the safer default when unsure.
What's the difference between STDEV.S and STDEV.P?
They divide by different amounts. STDEV.S (sample) divides by n−1, giving a slightly larger, less biased estimate of a population from a sample. STDEV.P (population) divides by n. On large datasets the difference is tiny; on small ones it matters.
What about the old STDEV function?
STDEV (no suffix) still works and equals STDEV.S — it's the legacy name kept for compatibility. STDEVP equals STDEV.P. Use the newer STDEV.S / STDEV.P names in current Excel.
How do I calculate standard deviation with a condition?
There's no STDEVIF. Filter or copy the rows you want first, then run STDEV.S on the result — or ask the question directly in a tool that handles the filtering for you.