Excel TVExcelTV

Standard Deviation in Excel: STDEV.S, STDEV.P, and Control Limits

Updated
Standard deviation curve diagram for an Excel tutorial

To calculate standard deviation in Excel, use =STDEV.S(range) for sample data or =STDEV.P(range) when your range contains the full population. For most business datasets, I use STDEV.S because the worksheet usually contains a sample of sales, tickets, expenses, or observations rather than every possible value.

Once you have the standard deviation, compare each value against the mean. A common alert band is three standard deviations from the mean: upper limit = mean + (3 * standard deviation) and lower limit = mean - (3 * standard deviation).

Quick Summary

  • Use STDEV.S for sample data and STDEV.P for complete population data.
  • The older STDEV and STDEVP functions still work, but Microsoft lists them as compatibility functions.
  • Three standard deviations cover about 99.73% of values in a normal distribution, which makes 3-sigma limits useful for alerting.
  • Download the updated workbook: standard-deviation-example.xlsx

Which Standard Deviation Function Should You Use?

Use STDEV.S when your Excel range is a sample and STDEV.P when it is the full population. That choice matters because sample standard deviation adjusts for the fact that a sample is estimating a larger group, while population standard deviation treats the data as complete.

Excel functionUse it whenExample
STDEV.S(range)Your worksheet has a sample from a larger process, customer set, or time period.=STDEV.S(C3:C127)
STDEV.P(range)Your worksheet contains every value in the population you want to measure.=STDEV.P(C3:C127)
STDEVA(range)You intentionally want text and logical values included in the calculation.=STDEVA(C3:C127)

Older workbooks may use STDEV() and STDEVP(). They are still available for compatibility, but the modern names are clearer: STDEV.S replaced STDEV, and STDEV.P replaced STDEVP.

When Standard Deviation Is Useful

Standard deviation is useful when you want to separate normal variation from values that deserve attention. Executives, managers, and small business owners can waste time reacting to every bump in a chart. A control limit gives you a more disciplined trigger.

I usually want at least 30 data points before leaning on the result. The smaller the range, the more one unusual value can distort the calculation. I also check whether the data is roughly normal. If traffic spikes by 5x after a launch, or one unusually large sale throws off revenue, the mean and standard deviation need context before they become alert rules.

How to Calculate the Mean

bullet step 1

The mean is the average of your data points. Standard deviation measures spread around that mean, so this is the starting point. In the example workbook, the data points live in cells C3:C127, so the mean is:

=AVERAGE(C3:C127)

2015-05-22_01-31-55

How to Calculate One Standard Deviation

Use STDEV.S() for the sample-style workflow in this tutorial. Inside the parentheses, enter the same data range you used to calculate the mean:

=STDEV.S(C3:C127)

2015-05-22_01-42-26

If your range is the complete population, use =STDEV.P(C3:C127) instead. If you are updating an older workbook, replacing STDEV(C3:C127) with STDEV.S(C3:C127) keeps the sample-standard-deviation intent explicit.

What Do 1, 2, and 3 Standard Deviations Mean?

In a normal distribution, a predictable share of values falls within one, two, or three standard deviations of the mean. This is the reason standard deviation works well for simple alert bands.

2015-05-22_01-53-47

  • 1 standard deviation covers about 68.27% of values in perfectly normal data.
  • 2 standard deviations cover about 95.45%.
  • 3 standard deviations cover about 99.73%.
  • 4 standard deviations cover about 99.994%.

The key point: if your data is normal and a value lands beyond three standard deviations, it is unusual enough to review. If your data is skewed, seasonal, or full of one-time events, treat the limit as a prompt to investigate rather than a final verdict.

How to Calculate 3 Standard Deviations

To calculate three standard deviations, multiply the STDEV.S result by 3:

=STDEV.S(C3:C127)*3

2015-05-22_02-04-50

You can keep the standard deviation in one cell and multiply that cell by 3, or write the full formula directly. In a dashboard, I prefer separate cells for mean, standard deviation, and the multiplier because it is easier to audit later.

How to Set Control Limits

Control limits turn the standard deviation into an action rule. In the example, UCL means upper control limit and LCL means lower control limit. In a control chart, these are the lines that show when the process may be outside normal variation.

13946601_s

For a 3-sigma setup:

  • Upper control limit: =mean + (3 * standard_deviation)
  • Lower control limit: =mean - (3 * standard_deviation)

If the mean is 496.9 and three standard deviations equals 86.6, the upper control limit is 583.5 and the lower control limit is 410.3.

2015-05-22_02-19-13

Three sigma is conservative because only about 0.27% of values fall outside that range in perfectly normal data. You can use one or two standard deviations for a more sensitive alert, but expect more false alarms.

How to Set Alerts

Now bring it together with an IF statement. If the value is lower than the LCL or higher than the UCL, return ALERT; otherwise return a blank cell.

Here is the basic pattern:

=IF(OR(C3<$B$7,C3>$B$6),“ALERT”,"")

Conditional formatting can also work well here. The important part is not the exact alert formula. The useful part is that the alert is tied to normal variation rather than a gut reaction to every high or low number.

2015-05-22_02-33-24

Download the Sample

Download the updated Excel sample workbook. It includes sample values, AVERAGE, STDEV.S, STDEV.P, and 3-sigma control-limit formulas.

FAQ

Should I use STDEV.S or STDEV.P?

Use STDEV.S when your worksheet contains a sample. Use STDEV.P only when your range contains the entire population. Most day-to-day business worksheets are samples, so STDEV.S is usually the better default.

Is STDEV deprecated?

STDEV still works for old workbook compatibility, but the clearer modern function is STDEV.S. Likewise, STDEVP maps to STDEV.P. Updating the names makes the workbook easier to understand.

Why use three standard deviations for alerts?

Three standard deviations create a conservative alert band. In normal data, about 99.73% of values fall inside the mean plus or minus three standard deviations, so values outside the band are worth checking.

Attribution: “Standard deviation diagram” by Mwtoews. Licensed under CC BY 2.5 via Wikimedia Commons – http://commons.wikimedia.org/wiki/File:Standard\_deviation\_diagram.svg#/media/File:Standard\_deviation\_diagram.svg

Written by

Rick Grantham
Rick GranthamSix Sigma Black BeltCo-founder, Excel TV

Business Intelligence Product Manager, VENUS Fashion Inc.

  • Business Intelligence
  • Data Analytics
  • Strategy
  • Team Building
Rick Grantham, a Six Sigma Black Belt and co-founder of Excel.TV in 2014, is currently serving as the Business Intelligence Product Manager at VENUS Fashion Inc. since March 2023. He has extensive experience in data analytics, strategic thinking, and team building, having held various leadership roles in renowned companies, such as Vice President of VantagePoint Business Solutions and Senior Director of Business Intelligence Solutions at EPI-USE. With a strong background in creating data-driven solutions and improving business processes, Rick has consistently demonstrated success in delivering exceptional results and boosting revenue throughout his career.

Read more articles by Rick Grantham

Editorial standards

Fact Checking & Editorial Guidelines

Every article on Excel TV is held to a published editorial standard. The goal: accurate, current, and useful — without filler.

  1. Expert review.Drafts on technical Excel topics are reviewed by a contributor with hands-on, working knowledge of the feature being covered.
  2. Source validation.Claims about Excel behavior are tested in current Microsoft 365 builds. Third-party product claims are sourced from the vendor's own documentation.
  3. Disclosure.Affiliate links, sponsorships, and any commercial relationships that influenced a piece are disclosed in-line and at the foot of the article.
  4. Updates.Articles are revisited when Microsoft ships changes that affect the content. The most recent revision date is shown on every post.

Spot a problem? Email editor@excel.tv and we will look at it.

Subject-matter review

Reviewed by Subject Matter Experts

Technical Excel articles are reviewed by contributors with verifiable, hands-on experience in the topic — not generalist editors.

  • Qualified reviewers.Reviewers include Microsoft Excel MVPs, working business-intelligence practitioners, and Excel TV editorial staff. See each author's page for credentials.
  • Current to a known Excel build.Procedural articles state which Excel version they were validated against. Where Microsoft has since changed behavior, the article carries an inline update note.
  • Clarity check.Reviewers verify steps are reproducible by a reader at the assumed skill level — not just technically correct in a vacuum.

Want to contribute or review for Excel TV? See the about page.

Comments (5)

Historical comments preserved from the WordPress archive. Commenting is no longer active.

  1. Dmitry

    Very nice )

    1. Rick Grantham

      Thanks Dmitry 🙂

  2. stramilov

    Great, clean & easy!

    1. Rick Grantham

      Thanks Stramilov

  3. Sample Standard Deviation

    This is a great tutorial for calculating standard deviation in excel.