Skip to content

STDEV.P

Returns the standard deviation of a whole population: how far values typically sit from their average when you have every member of the group.

Syntax

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

Statistical

Excel 2010 and later, including Excel for Microsoft 365 and Excel for the web. The older STDEVP function works in every version.

Try it

Edit the formula in B11 or change the inputs. The sheet recalculates as you type.

B11
A
B
C
1
Machine
Lead time (days)
2
M-1
12
3
M-2
14
4
M-3
14
5
M-4
14
6
M-5
15
7
M-6
15
8
M-7
17
9
M-8
19
10
11
Std deviation
2

B11 =STDEV.P(B2:B9) returns 2

How STDEV.P works

STDEV.P measures spread when your data is everything: every machine in a plant, every branch in a region, every student in a class. It divides the sum of squared deviations by n, the number of values, and takes the square root.

Population versus sample

The choice between STDEV.P and STDEV.S depends on what your numbers represent.

  • Population: you have every member of the group, and you only want to describe that group. Use STDEV.P.
  • Sample: you have some of a larger group and want to estimate the spread of the whole. Use STDEV.S, which divides by n − 1 to correct for the fact that a sample tends to understate the spread.

For eight lead times of 12, 14, 14, 14, 15, 15, 17 and 19 days, the average is 15. The squared deviations add up to 32. STDEV.P divides by 8 and returns exactly 2. STDEV.S divides by 7 and returns about 2.14. The more values you have, the smaller the difference. With a handful of values it matters.

If you are unsure which applies, ask whether you would collect more data tomorrow and want to generalise. If yes, treat today's data as a sample.

What it ignores

In a range or cell reference, STDEV.P ignores text, blanks and TRUE/FALSE. Numbers typed straight into the formula are counted. An error value in the data makes the result an error. With a single number the result is 0, because one value has no spread. (STDEV.S returns #DIV/0! for one value.) With no numbers at all, STDEV.P returns #DIV/0!.

Reading the number

The standard deviation is in the same units as the data. For roughly bell-shaped data, about 68% of values fall within one standard deviation of the average. To compare spread across data sets of different scale, divide by the average (the coefficient of variation).

STDEVP and STDEV.P

The older STDEVP gives identical results and is kept only for compatibility. Prefer STDEV.P in new work. The square of the population standard deviation is the population variance, VAR.P. Its sample counterpart is VAR.S.

AVERAGE gives the centre and MEDIAN the middle value. STDEV.P describes how tightly values cluster around them.

Arguments

number1
The first number, cell or range of the population, such as B2:B9.
number2, ...optional
More numbers, cells or ranges, up to 254 more arguments. Text, blanks and TRUE/FALSE inside ranges are ignored.

Examples

Each example is a live sheet. Change the inputs or the formula and watch the result.

Example 1

Population standard deviation

B11 =STDEV.P(B2:B9)

Result: 2

The eight values are every machine in the plant. The average is 15, the squared deviations add up to 32, and the square root of 32 / 8 is exactly 2.

B11
A
B
C
1
Machine
Lead time (days)
2
M-1
12
3
M-2
14
4
M-3
14
5
M-4
14
6
M-5
15
7
M-6
15
8
M-7
17
9
M-8
19
10
11
Std deviation
2

B11 =STDEV.P(B2:B9) returns 2

Example 2

How much STDEV.S differs

B11 =ROUND(STDEV.S(B2:B9)-STDEV.P(B2:B9),3)

Result: 0.138

STDEV.S is about 2.138 and STDEV.P is 2. The sample version is always larger, and the gap narrows as the data grows.

B11
A
B
C
1
Machine
Lead time (days)
2
M-1
12
3
M-2
14
4
M-3
14
5
M-4
14
6
M-5
15
7
M-6
15
8
M-7
17
9
M-8
19
10
11
STDEV.S minus STDEV.P
0.138

B11 =ROUND(STDEV.S(B2:B9)-STDEV.P(B2:B9),3) returns 0.138

Example 3

A small group where every member is measured

B7 =ROUND(STDEV.P(B2:B5),2)

Result: 2.24

The average is 11 and the squared deviations add up to 20. Divided by 4 that is 5, and its square root is 2.236, rounded to 2.24.

B7
A
B
C
1
Machine
Output (units/h)
2
A
8
3
B
10
4
C
12
5
D
14
6
7
Std deviation
2.24
8

B7 =ROUND(STDEV.P(B2:B5),2) returns 2.24

Example 4

A single value has no spread

B4 =STDEV.P(B2)

Result: 0

One value equals its own average, so its spread is 0. STDEV.S would return #DIV/0! here.

B4
A
B
C
1
Machine
Output (units/h)
2
A
8
3
4
Std deviation
0
5
6

B4 =STDEV.P(B2) returns 0

Your turn.

Solve it in the sheet. Every answer is checked, with hints if you need them.

Task 1 of 2

These eight machines are the whole plant. In B11, return the standard deviation of their downtime.

Answer in B11.

B11
A
B
C
1
Machine
Downtime (min)
2
M-1
18
3
M-2
22
4
M-3
22
5
M-4
22
6
M-5
25
7
M-6
25
8
M-7
31
9
M-8
35
10
11
Std deviation
12
Relative spread

Common mistakes

  • Using STDEV.P on a sample understates the spread. If your data is a subset of a larger group, use STDEV.S.
  • A single number returns 0, not an error, which can hide missing data. Check the count with COUNT when a range might be nearly empty.
  • Text, blanks and TRUE/FALSE in a range are ignored. Numbers stored as text are ignored too, so the result may use fewer values than you expect.
  • Zeros that mean "no data" inflate the spread. Clean the range before calculating.
  • An outlier can change the standard deviation a lot. Look at the data before relying on a single summary figure.

Questions people ask

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

STDEV.P divides by n and treats the data as the whole population. STDEV.S divides by n - 1 and treats it as a sample. The sample version is always slightly larger.

What is the difference between STDEVP and STDEV.P?

They return the same result. STDEV.P is the newer name from Excel 2010, and STDEVP is kept for compatibility.

Why does STDEV.P return 0?

Either every value is the same, or the range holds only one number. In both cases there is no spread.

Which one should I use for survey results?

Usually STDEV.S, because a survey is a sample of a larger group. Use STDEV.P only if you surveyed everyone you want to describe.

Learn STDEV.P in a real sheet.

Tracks take you from the basics to modelling, one graded exercise at a time.