Σ
SDCalc
ПочатковийTutorials·12 min

Standard Deviation in Excel: STDEV.S vs STDEV.P

Learn when to use STDEV.S versus STDEV.P in Excel, how the sample-versus-population choice changes the result, and how to avoid common spreadsheet mistakes.

By Standard Deviation Calculator Team · Data Science Team·Published

Which Excel Function Should You Use?

Excel gives you more than one standard deviation formula, but the real decision is statistical, not technical. Use `STDEV.S` when your worksheet contains a sample from a larger population, and use `STDEV.P` when the sheet contains the entire population you want to describe.

That means most surveys, classroom subsets, lab replicates, and recent production runs belong in `STDEV.S`. Full employee rosters, all shifts in a closed pilot, or every value in a fixed historical dataset are the main situations where `STDEV.P` makes sense. If that distinction is still fuzzy, read Sample vs. Population first, then compare your result against the site's sample standard deviation calculator or population standard deviation calculator.

Short rule

If you can realistically collect more values later, your current sheet is usually a sample, so `STDEV.S` is the safer default.

STDEV.S vs STDEV.P in One Minute

The formulas look similar in Excel, but they divide by different denominators. `STDEV.S` uses `n - 1` through Bessel's correction, while `STDEV.P` uses `N` because no estimation adjustment is needed for a full population.

Excel functionUse whenDenominator ideaTypical examples
`STDEV.S(range)`Your data are a sample from a larger group`n - 1`Survey responses, 10 parts from a long production line, one class section
`STDEV.P(range)`Your data are the complete population of interest`N`All 12 monthly totals for a finished year, every machine in a small fleet, every score in one fixed event
`STDEV(range)`Legacy sample functionBehaves like sample SDOlder workbooks that have not been modernized
`STDEVP(range)`Legacy population functionBehaves like population SDOlder workbooks that have not been modernized

Why the answers differ

For the same values, `STDEV.S` is usually a little larger than `STDEV.P` because it corrects for the fact that a sample tends to underestimate the true population spread. If you want the math behind that adjustment, continue with Bessel Correction (n-1) Explained.

Worked Example: Exam Scores

Suppose `B2:B9` contains eight exam scores from one section: `72, 75, 81, 79, 68, 74, 77, 84`. If those eight students are only one section from a larger course, treat them as a sample.

Excel
=AVERAGE(B2:B9)
=STDEV.S(B2:B9)
=STDEV.P(B2:B9)

The mean is 76.25. The sample standard deviation is about 5.25, while the population standard deviation for the same eight values is about 4.91. Both calculations are mechanically valid; only one matches the question you are actually asking.

FormulaResultInterpretation
`=AVERAGE(B2:B9)``76.25`Average score
`=STDEV.S(B2:B9)``5.25`Best choice if this section is a sample from a larger student population
`=STDEV.P(B2:B9)``4.91`Only correct if these eight scores are the entire population of interest

A useful audit habit is to calculate both once, then explain in one sentence why one belongs in the report. That forces you to clarify the population definition before a spreadsheet default turns into a statistical mistake.

Worked Example: Complete Population

Now imagine `C2:C7` contains the defect counts for every shift in a six-shift pilot that has already ended: `2, 3, 2, 4, 1, 3`. If the pilot itself is the whole group you care about, `STDEV.P` is the right summary.

Excel
=AVERAGE(C2:C7)
=STDEV.P(C2:C7)

The mean is 2.5 and the population standard deviation is about 0.96. In plain language, shift defect counts typically vary by about one defect from the pilot average. If you later treat that pilot as evidence about a longer process, switch to `STDEV.S` because the pilot becomes a sample.

The same cells can change meaning

A range does not permanently belong to `STDEV.S` or `STDEV.P`. The correct formula changes when the business question changes from describing one closed dataset to estimating a larger process.

Legacy Functions and Data Cleanup

Modern Excel workbooks should prefer `STDEV.S` and `STDEV.P`, but you will still see older files that use `STDEV` and `STDEVP`. Those legacy names are mainly a maintenance problem because teammates may not realize they imply the same sample-versus-population split.

Modern formulas to prefer

Use `STDEV.S` and `STDEV.P` in new workbooks because the names make the statistical choice explicit and easier to review.

Data cleanup before trusting the answer

Check the range, confirm units match, remove accidental headers from the selected cells, and use `AVERAGE` or the descriptive statistics calculator to sanity-check the dataset.

Excel generally ignores text and empty cells inside referenced ranges for these functions, which is convenient but also dangerous when bad imports hide inside a column. If the worksheet contains grouped counts instead of raw values, do not use a simple range formula. Use Standard Deviation from a Frequency Table instead.

Common Excel Mistakes

  • Using `STDEV.P` on a sample:This understates spread slightly and is one of the most common reporting errors in classroom, survey, and QC spreadsheets.
  • Calculating SD on averages:Monthly averages, department summaries, or already-aggregated percentages answer a different question from the spread of the raw observations.
  • Mixing units:A range that combines milliseconds and seconds, pounds and kilograms, or scores from different scales makes the standard deviation meaningless.
  • Copying formulas without checking the range:Relative references can quietly shift from `B2:B9` to the wrong cells. Audit the selected range before trusting copied outputs.

When the next step is interpretation rather than computation, continue with How to Interpret Standard Deviation. If you need to convert a value into relative standing, the z-score calculator and Z-Score Explained are the natural follow-ups.

Excel Checklist

1

Define the population in words

Write one sentence describing whether the worksheet is a sample from something larger or the full group you care about.
2

Use the matching formula

Choose `STDEV.S` for a sample and `STDEV.P` for a full population. Replace legacy `STDEV` or `STDEVP` when you update old workbooks.
3

Check the range and the mean

Verify the selected cells and run `=AVERAGE(range)` as a quick sanity check before reporting the spread.
4

Confirm the data are raw and comparable

Do not mix units, summarized rows, or already-averaged values unless that is the variable you intentionally want to study.
5

Cross-check once outside Excel

The core lesson is simple: `STDEV.S` versus `STDEV.P` is not just an Excel syntax choice. It is a statement about what your data represent. Once that decision is correct, the spreadsheet calculation becomes straightforward.

Further Reading

Sources

References and further authoritative reading used in preparing this article.

  1. Microsoft Support: STDEV.S functionMicrosoft
  2. Microsoft Support: STDEV.P functionMicrosoft
  3. Microsoft Support: AVERAGE functionMicrosoft

How to Read This Article

A statistics tutorial is a practical interpretation guide, not just a formula dump. It refers to the assumptions, notation, and reporting language that analysts need when they explain a result to a teacher, manager, client, or reviewer. The article body covers the specific topic, while the sections below create a common interpretation frame that readers can reuse across related metrics.

Reading goalWhat to focus onCommon mistake
DefinitionWhat the metric is and what quantity it summarizesTreating the formula as self-explanatory
Formula choiceSample versus population assumptions and notationUsing n when n-1 is required or vice versa
InterpretationWhether the result indicates concentration, spread, or riskCalling a large value good or bad without context

Frequently Asked Questions

How should I interpret a high standard deviation?

A high standard deviation means the observations are spread farther from the mean on average. Whether that spread is acceptable depends on the context: wide dispersion might signal risk in finance, instability in manufacturing, or genuine natural variation in scientific data.

Why do some articles mention n while others mention n-1?

The denominator reflects the difference between population and sample formulas. Population variance and population standard deviation use N because the full dataset is known. Sample variance and sample standard deviation often use n-1 because Bessel’s correction reduces bias when estimating population spread from a sample.

What is a statistical interpretation guide?

A statistical interpretation guide is a page that moves beyond arithmetic and explains meaning. It tells you what a metric is, when the formula applies, and how to describe the result in plain English without overstating certainty.

Can I cite this article in a report?

You should cite the underlying authoritative reference for formal work whenever possible. This page is best used as an explanatory bridge that helps you understand the concept before quoting the original standard or handbook.

Why include direct citations on every article page?

Direct citations give readers a route to verify the definition, notation, and assumptions. That improves trust and reduces the chance that a simplified explanation is mistaken for the entire technical standard.

Authoritative References

These sources define the concepts referenced most often across our articles. Bessel's correction is a sample adjustment, variance is a squared measure of spread, and standard deviation is the square root of variance expressed in the same units as the data.