Why does STDEV give a different number than your stats textbook? Why does =STDEV(A1:A10) return #DIV/0! when A7 is blank — but =STDEV.S(A1:A10) doesn’t? Why did your manager’s report show 12.7% volatility while yours showed 13.9%, even with identical data?
Quick Answer
STDEV (the legacy function) defaults to STDEV.S — sample standard deviation — but only if all arguments are numbers. If you pass a range with text or blanks, it ignores them *and still treats the result as a sample*. It never uses the population formula unless you explicitly type STDEV.P. And yes — one empty cell in A1:A20 changes the denominator from 19 to 18. That’s not a bug. It’s by design.
All the Methods
| Method | Steps | Best For | Limitations |
|---|---|---|---|
| STDEV (legacy) | Type =STDEV(B2:B12) — no extra steps | Backward compatibility; quick entry in older models | Ignores text/blanks silently; no warning if data is actually a full population |
| STDEV.S | Type =STDEV.S(C2:C12); press Enter | Most real-world cases — sales, survey responses, test scores | Requires ≥2 numeric values; returns #DIV/0! with only one number |
| STDEV.P | Type =STDEV.P(D2:D12); confirm with Ctrl+Enter to avoid accidental array entry | Complete census data — e.g., all 12 monthly revenue figures for 2023 | Underestimates variability if used on samples — common error in finance dashboards |
| AGGREGATE + STDEV.S | =AGGREGATE(7,6,B2:B12) — 7 = STDEV.S, 6 = ignore errors | Data with #N/A, #VALUE!, or inconsistent formatting | Doesn’t distinguish between sample/population logic — always uses n−1 |
Method 1 Deep Dive
Open a new sheet. Paste this into A1:C12:
| Sales Rep | Q1 Sales ($) | Q2 Sales ($) |
|---|---|---|
| Sarah Chen | $45,200 | $48,900 |
| James Wu | $39,750 | $41,320 |
| Amina Patel | $52,100 | $50,800 |
| Diego Morales | $44,300 | $46,150 |
| Linh Tran | $47,800 | $49,200 |
| Rajiv Kapoor | $38,900 | $40,050 |
| Maya Okafor | $51,600 | $53,400 |
| Tariq Hassan | $42,200 | $43,780 |
| Elena Ruiz | $46,500 | $47,100 |
| Kenji Tanaka | $49,300 | $50,600 |
Select B2:B11 — Q1 sales for 10 reps. In D2, type =STDEV(B2:B11). Press Enter. Result: $4,278.36.
Now delete B6 (James Wu’s $39,750). Type =STDEV(B2:B11) again. Still $4,278.36? No — it’s now $4,352.19. Why? Because STDEV recalculates n−1 using only the 9 numbers it sees — denominator drops from 9 to 8. It doesn’t warn you. It just changes.
Here’s the counterintuitive tip: STDEV doesn’t care about your intent. Even if those 10 reps are your entire sales team (a population), STDEV still uses n−1. To fix that, use STDEV.P — but only if you’re 100% certain you have every single observation.
Method 2 Deep Dive
Go to column E. Label E1 “Q1 Volatility %”. In E2, type: =STDEV.S(B2:B11)/AVERAGE(B2:B11). Press Ctrl+Enter. Format as % → gives 9.12%.
This is how finance teams calculate coefficient of variation — a normalized measure. But here’s what most miss: if any cell in B2:B11 contains text — say, “N/A” instead of a blank — STDEV.S ignores it. STDEV.P does too. Both functions skip non-numeric entries. They don’t throw an error. They just shrink your sample size silently.
Try it: In B7, type “—” (a dash). Now recalculate =STDEV.S(B2:B11). It drops to $4,112.03. You lost one value. But nothing flagged it. That’s why pros wrap STDEV.S inside IFERROR or use AGGREGATE — especially in live dashboards pulling from ERP exports where “N/A” or “TBD” creep in.
Keyboard shortcut: Alt+M, V, S opens the Function Arguments dialog for any selected function — useful when you forget whether STDEV.S uses n or n−1. Alt+M, V, S → tab to “Number1”, then read the tooltip: “Number1 Required. The first number argument corresponding to a sample of a population.” That “sample” tells you everything.
Cheat Sheet
| Task | Formula | Shortcut / Tip | When to Use |
|---|---|---|---|
| Calculate sample std dev | =STDEV.S(B2:B15) | Alt+M, V, S → check tooltip says “sample” | Survey data, test scores, weekly KPIs |
| Calculate population std dev | =STDEV.P(D2:D12) | If n = total count, not subset — verify manually | All 12 months of 2023 revenue; final exam grades for entire class |
| Ignore errors & blanks safely | =AGGREGATE(7,6,B2:B20) | 7 = STDEV.S logic; 6 = ignore errors, hidden rows, nested SUBTOTALs | Dashboards fed by unstable source data |
| Compare volatility across metrics | =STDEV.S(E2:E10)/AVERAGE(E2:E10) | Always pair with AVERAGE — never raw STDEV alone for comparison | Sales vs support ticket volume vs CSAT scores |