LXLogicExcel
๐Ÿ”ฅ
0
โญ
0

How to Calculate Standard Deviation in Excel

By the LogicExcel Editorial Teamโ€ขUpdated June 2026โ€ข4 min readโ€ข640 wordsโ€ขPractice this โ†’

Ready to practice?

Apply what you just learned with interactive exercises.

Start Lesson 90 โ†’

Standard deviation measures how spread out numbers are around their average. A low value means the numbers sit close together. A high value means they swing.

Excel has two everyday functions:

  • STDEV.S โ€” sample standard deviation. Use this on a subset (this week's orders, this class of students). This is the one you want most of the time.
  • STDEV.P โ€” population standard deviation. Use this only when the range is the entire group you care about.
The old names STDEV and STDEVP still work. They map to STDEV.S and STDEV.P.

Syntax

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

Pass a range (B2:B20) rather than listing cells. Text and blank cells are ignored. Logical values typed into the range are ignored; logical values you pass as arguments are counted.

Worked example

Five test scores in B2:B6 โ€” 10, 12, 14, 16, 18.

=AVERAGE(B2:B6)   โ†’ 14
=STDEV.S(B2:B6)   โ†’ 3.16
=STDEV.P(B2:B6)   โ†’ 2.83

STDEV.S divides by nโˆ’1 (4), STDEV.P by n (5). The sample number is always a bit larger. If you are describing "these five scores only," use STDEV.P. If these five are a sample of a larger class, use STDEV.S.

When the number looks wrong

  • You used STDEV.P on a sample. Switch to STDEV.S.
  • A text "N/A" sat in the range. STDEV ignores it, so the divisor is smaller than you think. Filter those rows out first.
  • You included the header. Text is ignored, so this one is usually harmless.
  • #DIV/0! โ€” fewer than two numeric cells for STDEV.S.

STDEV vs AVERAGE vs MAX

AVERAGE tells you the centre. STDEV tells you the scatter. Two classes can both average 70. One with STDEV.S of 3 is consistent; one with STDEV.S of 18 has a mix of very high and very low scores. Report both.

Frequently Asked Questions

How do I calculate standard deviation in Excel?

Select the cell for the result and type =STDEV.S(B2:B20) where B2:B20 is your data. Press Enter. Use STDEV.P instead only if that range is the entire population.

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

STDEV.S is the sample formula (divide by nโˆ’1). STDEV.P is the population formula (divide by n). For a sample of a larger set, STDEV.S is correct.

Does Excel have a standard deviation function for a sample?

Yes. STDEV.S. The older STDEV name does the same thing.

Can I calculate standard deviation for a filtered list?

STDEV.S includes hidden rows. Use =SUBTOTAL(7, B2:B20) if you want the sample standard deviation of visible rows only (function number 7 is STDEV.S).
Practice How to Calculate Standard Deviation in Excel โ†’