How to Calculate Standard Deviation in Excel
Standard deviation is one of those statistical concepts that sounds intimidating but becomes surprisingly approachable once you see it in action — especially in Excel, which handles all the heavy math for you. Whether you're analyzing test scores, sales figures, survey responses, or any dataset where spread and variability matter, Excel gives you several built-in functions to get there fast.
Here's what you actually need to know.
What Standard Deviation Is Actually Measuring
Before touching a formula, it helps to understand what you're calculating. Standard deviation measures how spread out values are around the average (mean) of your dataset. A low standard deviation means your data points cluster tightly together. A high standard deviation means they're scattered widely.
For example, if five employees all earn salaries within $2,000 of each other, the standard deviation is small. If salaries range from $30,000 to $150,000, the standard deviation is large — and that gap tells you something meaningful about the data.
The Two Main Standard Deviation Functions in Excel
Excel offers multiple standard deviation functions, and choosing the wrong one is the most common mistake people make. The two you'll use most are:
| Function | Full Name | Use When |
|---|---|---|
STDEV.S | Sample Standard Deviation | Your data is a sample of a larger population |
STDEV.P | Population Standard Deviation | Your data is the entire population |
STDEV.S is the right choice in most real-world scenarios. If you surveyed 200 customers out of 10,000, you have a sample. If you have complete data — every single value in the group — use STDEV.P.
The mathematical difference comes down to the denominator used in the calculation: STDEV.S divides by n−1 (Bessel's correction), while STDEV.P divides by n. For large datasets the difference is small; for small datasets it matters more.
How to Write the Formula
The syntax is straightforward. Click an empty cell, then type:
=STDEV.S(A2:A100) Replace A2:A100 with whatever range holds your data. Excel calculates and returns the standard deviation immediately.
You can also reference non-contiguous ranges:
=STDEV.S(A2:A50, C2:C50) Or individual values if your dataset is small:
=STDEV.S(14, 18, 22, 19, 25) 📊 Excel ignores text and logical values (TRUE/FALSE) in your range by default with STDEV.S and STDEV.P — they simply won't factor into the calculation.
What About the Older STDEV Function?
You may encounter STDEV without the .S — this is a legacy function that works identically to STDEV.S and exists for backward compatibility with older spreadsheets. Microsoft recommends using the newer .S and .P versions because they're clearer about intent. If you're opening a file that uses STDEV, it still works — just know what it's doing.
Similarly, STDEVPA and STDEVA exist for cases where you want Excel to include text and logical values in the calculation (text counts as zero, TRUE as 1, FALSE as 0). These are edge cases most users won't need.
Calculating Standard Deviation Step-by-Step in Practice
Here's a realistic workflow:
- Enter your data in a single column or row — say, A2 through A21 for 20 data points
- Click an empty cell where you want the result to appear
- Type your formula —
=STDEV.S(A2:A21)for a sample - Press Enter — Excel returns the standard deviation
To see the mean alongside it, use =AVERAGE(A2:A21) in an adjacent cell. Together, these two numbers give you a cleaner picture of your data's center and spread.
Using Standard Deviation With Other Excel Tools
Standard deviation doesn't usually live alone. It pairs naturally with:
- AVERAGE — to understand where data centers before asking how far it spreads
- Conditional formatting — you can highlight values more than one standard deviation from the mean using a formula-based rule
- Charts — Excel's built-in error bar options let you display standard deviation visually on bar and line charts, which is common in scientific and business reporting
- NORM.DIST — if you're working with normally distributed data and want to calculate probabilities around your mean
Factors That Affect Which Function and Approach You Need 🎯
This is where individual situations start to diverge:
Dataset size — With very small datasets (under 10–15 values), the difference between STDEV.S and STDEV.P becomes more significant. With hundreds or thousands of rows, they converge.
Data type — Financial data, scientific measurements, survey Likert scales, and time-series data all have different conventions around population vs. sample framing.
What you're reporting — Academic, scientific, and medical contexts often have strict conventions about which standard deviation type to use and how to report it. Business dashboards are more flexible.
Excel version — STDEV.S and STDEV.P were introduced in Excel 2010. If you're working in a very old environment (Excel 2007 or earlier), you'll rely on STDEV and STDEVP instead — the legacy equivalents.
Whether your data is clean — Standard deviation is sensitive to outliers. A single extreme value can inflate it significantly. Whether that's meaningful or a data error depends entirely on your context.
Understanding the formula is the straightforward part. Knowing which function fits your dataset, what your result actually implies, and how to act on it — that's where your specific data, field, and analytical goals become the deciding factor.