Excel tutorial
/

Functions

Advanced

Excel STDEV.S: sample standard deviation and quality control

STDEV.S calculates the standard deviation of a sample. Why n−1, how it differs from STDEV.P, quality-control limits and comparing suppliers — with examples.

A flour mill turns out 1,000 bags of 50 kg a day. Weighing them all is impossible — an inspector weighs 6 bags and draws conclusions about the whole batch. That is a sample.

STDEV.S is built for exactly this: “S” stands for sample, meaning your data is part of a larger population. The function estimates the spread of the whole population from the sample.

Surveys, quality control, test measurements, forecasts based on a few months of data — most practical tasks call for STDEV.S.

Книга1 - Excel
—☐✕
E3fx=СТАНДОТКЛОН.В(B2:B7)
ABCDEF
1BagWeight (kg)MeasureValue
2#149,8Average50,017
3#250,3STDEV.S0,306
4#350,1STDEV.P0,279
5#449,6
6#550,4
7#649,9
8
Готово
6 bags are a sample of 1,000, so STDEV.S: 0.306 kg. STDEV.P would give 0.279 — understating the spread

Syntax and why n − 1

=СТАНДОТКЛОН.В(number1; [number2]; ...)

  • number1 — the range of sample values.
  • number2, … — more ranges, up to 255.

Text, TRUE/FALSE and empty cells are skipped. You need at least 2 numbers, otherwise #DIV/0!.

The only difference: STDEV.P divides the sum of squares by n, STDEV.S by n − 1. Why: the sample average is calculated from those same values and sits “too close” to them, so the spread looks smaller than it really is. Dividing by n − 1 corrects that bias. The old STDEV function is exactly STDEV.S.

Entering STDEV.S

1

Select E3. Формулы → Вставить функцию → category Statistical → STDEV.S → OK.

Книга1 - Excel
—☐✕
B2fx49,8
ABCD
1BagWeight (kg)
2#149,8
3#250,3
4
5
Готово

2

Select B2:B7 for Number1 and click OK.

Книга1 - Excel
—☐✕
E3fx=СТАНДОТКЛОН.В(B2:B7)
ABCDEF
1BagWeight (kg)MeasureValue
2#149,8Average50,017
3#250,3STDEV.S0,306
4#350,1
5#449,6
6#550,4
7#649,9
8
ГотовоСреднее: 50,0167Количество: 6Сумма: 300,1

3

Report the result together with the average: 50.02 ± 0.31 kg. It means “a typical bag falls within this range”.

Книга1 - Excel
—☐✕
B2fx=КОРЕНЬ(A2/(A2-1))
ABCD
1Sample size (n)S / P ratio
231,225
351,118
4101,054
5301,017
61001,005
7
Готово
Example 1: STDEV.S is always larger than STDEV.P. With 3 values the gap is 22%, with 30 only 1.7%. Picking the right function matters most for small samples
Книга1 - Excel
—☐✕
C3fx=ЕСЛИ(ИЛИ(B3<$F$2;B3>$F$3);"Check";"OK")
ABCDEFG
1New bagWeightStatusLimitkg
2#750,2OKLower49,40
3#849,2CheckUpper50,63
4#950,7Check
5#1049,9OK
6
Готово
Example 2: quality control. Limits = average ± 2 × STDEV.S (50.02 ± 0.61). A bag outside them signals that the line needs checking
Книга1 - Excel
—☐✕
C9fx=СТАНДОТКЛОН.В(C2:C7)
ABCD
1OrderFirm A (days)Firm B (days)
2134
3254
4323
5444
6565
7634
8Average3,834,00
9STDEV.S1,470,63
10
Готово
Example 3: delivery times. Firm A is slightly faster on average (3.83 days) but deviates by 1.47 — sometimes 2 days, sometimes 6. Firm B: 4 days ± 0.63 — more reliable for planning

Pro level: confidence intervals and control charts

  • Standard error of the mean: =СТАНДОТКЛОН.В(B2:B7)/КОРЕНЬ(СЧЁТ(B2:B7)) — how far the sample average may be from the true one.
  • 95% confidence interval: =CONFIDENCE.T(0,05;СТАНДОТКЛОН.В(B2:B7);СЧЁТ(B2:B7)) — about 0.32 kg in the flour example. So the batch’s true average weight is 50.02 ± 0.32 kg with 95% confidence.
  • Control chart: plot the average and ± 3 × STDEV.S lines on a line chart — a point beyond the lines means the process has drifted.
  • Filtered data: =ПРОМЕЖУТОЧНЫЕ.ИТОГИ(7;B2:B100) or =AGGREGATE(7;5;B2:B100) — visible rows only (7 = STDEV.S).

Try it in the simulator

Type =СТАНДОТКЛОН.В(B2:B7) in E3. Then type =E2-2*E3 in E4 and =E2+2*E3 in E5 — these are the control limits. Change B7 to 51.5 — how does the deviation change?

Книга1 - Excel
—☐✕
Буфер обмена
Шрифт
Выравнивание
Число
Стили
Ячейки
Редактирование
✕✓fx
ABCDEFGHIJKLMNOPQRSTUVWX
1BagWeight (kg)MeasureValue
2#149,8Average50,0166666667
3#250,3STDEV.S
4#350,1Lower limit
5#449,6Upper limit
6#550,4
7#649,9
8
9
10
11
Лист1
Готово

Has ExcelLab been useful?

Support the project and help us release new lessons and exercises.

Support us
Previous

128 / 154