Formula for STDEV in Excel

“formula for stdev in excel” comes up constantly, so this page leads with the exact answer, gives you a tool to try it on your own numbers, and only then explains the detail. Everything works in Excel on Windows and Mac and maps almost one-to-one to Google Sheets. Copy the answer above and get back to work, or read on to turn a one-off fix into something you never have to look up again.

Exact answer

In Excel: use =STDEV.S(range) for a sample and =STDEV.P(range) for a whole population — it measures how far values typically sit from the mean.

On this page8

Syntax

=STDEV.S(number1, [number2], ...)

Arguments

Argumentrequired / optionalDescription
number1requiredThe first number or range.
number2, ...optionalFurther values or ranges. Text and blanks are ignored.

Related functions

VARAVERAGESTANDARDIZE
ƒxStandard DeviationLive

n = 6 · mean = 14.67

Sample std. deviation (σ)
4.131

Variance = 17.067

=STDEV.S(A1:A6)
Ctrl+CthenCtrl+Shift+V+Cthen+Ctrl+VPaste values · WindowsMac

Need it as an auditable file?

Ships inside the linked template — formula-driven, unlocked, audit-ready.

View template

What this does

Standard deviation summarises spread in the same units as the data. Excel splits it in two, and choosing wrongly is the classic error: STDEV.S divides by n-1 and is correct when your data is a sample of something larger; STDEV.P divides by n and is correct only when you hold every member of the population. The difference shrinks as the dataset grows but is material on small ones. The legacy STDEV matches STDEV.S. Because it is the square root of the variance, the two always agree — STDEV is simply the one in readable units. Most people learn this as a sequence of clicks and forget it by next week; learning it as a pattern instead is what lets you apply it to the next, slightly different version of the problem without starting from scratch. That is the difference this page is trying to make. For “formula for stdev in excel”, the reliable version is a short checking loop, not just the first command that appears to work. Run it on a deliberately small range first, watch how the affected formula change, and only then apply the same setup to the full sheet. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. That is what makes a calculation you can defend to a CFO or an auditor useful in real work: repeatable, auditable, and not dependent on memory or luck.

A worked example

Twelve monthly delivery times in B2:B13, treated as a sample of ongoing performance: =STDEV.S(B2:B13) might return 1.8 days against a mean of 4.2. Control limits then follow directly: =AVERAGE(B2:B13)+2*STDEV.S(B2:B13) marks the upper bound of normal variation. Standard deviation is what turns "the average is 4.2 days" into a statement about reliability, which is the part decisions actually rest on. A practical tip before you scale it up: build it once on a small block of test data, confirm the number against the tool on this page, and only then point it at your real sheet. That one habit catches almost every mistake while it is still cheap to fix, long before a wrong figure reaches a report or a colleague.

In Google Sheets

Everything above works in Google Sheets too. Excel and Sheets share the formula syntax used here; only the surrounding menus are arranged differently. That portability is deliberate — learn it once and it follows you between the two tools and across Windows and Mac. Keep this page bookmarked for the next time the same question comes up. Better still, rebuild the example once in your own sheet — doing it yourself, with the tool above to check against, is what turns a copied formula into a technique you own. If you take one thing from this page on “formula for stdev in excel”, make it the habit rather than the keystrokes: set the problem up with labelled inputs, reference those cells, and let Excel do the recomputing. Bookmark the page for the syntax, but do the example once in a blank sheet and check it against the tool above — five minutes of hands-on practice fixes the method in memory far better than re-reading, and it surfaces the small snags while they are still harmless. After that the technique is genuinely yours: faster than searching for it again, and reliable enough to drop into work that other people depend on.

Common mistakes

  • Using STDEV.P on sample data, which understates the spread — the n-1 divisor in STDEV.S exists to correct exactly that.
  • Interpreting the standard deviation without the mean; the same 1.8 means something very different against a mean of 4 than against a mean of 400.
  • Applying it to strongly skewed data, where the standard deviation implies a symmetry the data does not have.

Frequently asked questions

What is the difference between STDEV.S and STDEV.P?

STDEV.S divides by n-1 and is for samples; STDEV.P divides by n and is only correct when the data covers the entire population.

Which should I use?

Almost always STDEV.S. Real datasets are nearly always samples of an ongoing process rather than a closed population.

How does it relate to variance?

It is the square root of the variance, which puts it back in the original units and makes it directly comparable to the mean.