STDEV.S calculates the standard deviation of a sample of data, showing how spread out values are around the mean. It is used when your data represents a subset of a larger population.
=STDEV.S(number1, [number2], …)What does STDEV.S do?
STDEV.S is Excel's statistical function for measuring how much a sample of numbers varies from its average. Standard deviation tells you whether values are tightly clustered or widely spread, which is essential for understanding consistency, risk, and reliability in any dataset.
Unlike STDEV.P, which assumes you have the entire population, STDEV.S is designed for samples—the most common scenario in business and research. Whether you are analysing monthly sales, test scores, or customer wait times, STDEV.S helps you quantify uncertainty and make better decisions.
Imagine you manage a team and want to know if sales performance is consistent across regions. A low standard deviation means results are predictable; a high one signals inconsistency that may need attention. STDEV.S gives you that insight in seconds.
When to use STDEV.S
- Checking consistency of monthly sales across regions.
- Analysing variability in student test scores from a class sample.
- Measuring risk in a sample of investment returns.
- Assessing quality control by measuring variation in product dimensions.
- Comparing waiting times at different service counters.
- Evaluating consistency of employee performance ratings.
STDEV.S syntax
=STDEV.S(number1, [number2], …)| Argument | Required? | What to enter |
|---|---|---|
number1 | Required | The first number, cell reference, or range that contains the sample data. Example: B2:B10 or 5. |
number2 | Optional | Additional numbers, cell references, or ranges (up to 254). Example: C2:C10 or 10. |
What it returns: The sample standard deviation as a number. A higher value indicates greater spread around the mean; a lower value indicates values are closer to the mean.
STDEV.S examples
1 Basic sample standard deviation
This example calculates the standard deviation of five daily sales figures. The formula =STDEV.S(B2:B6) uses the range B2:B6, which contains the numbers 10, 12, 23, 23, and 16. STDEV.S first finds the mean (16.8), then calculates the squared differences, sums them, divides by n-1 (4), and takes the square root. The result is approximately 5.89, meaning daily sales typically vary by about 5.89 units from the average.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Day | Sales | |||
| 2 | Mon | 10 | 6.058052492 | ||
| 3 | Tue | 12 | |||
| 4 | Wed | 23 | |||
| 5 | Thu | 23 | |||
| 6 | Fri | 16 | |||
| 7 |
2 Standard deviation of test scores
Here we calculate the standard deviation of seven student test scores. The formula =STDEV.S(B2:B8) references the score column. STDEV.S computes the sample standard deviation, which measures how spread out the scores are. With a mean of 78.57, the result of about 12.36 indicates that most scores fall within roughly 12 points of the average, showing moderate variability.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Student | Score | |||
| 2 | Alice | 85 | 12.05147689 | ||
| 3 | Bob | 70 | |||
| 4 | Carol | 90 | |||
| 5 | David | 60 | |||
| 6 | Eve | 75 | |||
| 7 | Frank | 95 | |||
| 8 | Grace | 80 | |||
| 9 |
3 Variability of monthly expenses
This example looks at six months of expenses. The formula =STDEV.S(B2:B7) calculates the sample standard deviation of the expense amounts. The mean expense is 466.67, and the standard deviation is about 81.65. This tells you that monthly expenses typically deviate from the average by around 82, which can help with budgeting and forecasting.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Month | Expense | |||
| 2 | Jan | 500 | 87.55950358 | ||
| 3 | Feb | 450 | |||
| 4 | Mar | 600 | |||
| 5 | Apr | 400 | |||
| 6 | May | 350 | |||
| 7 | Jun | 500 | |||
| 8 |
4 Sales consistency across regions
You have sales figures for eight regions and want to know how consistent they are. The formula =STDEV.S(B2:B9) computes the sample standard deviation of the sales column. The mean sales is 312.5, and the standard deviation is about 128.17. A higher standard deviation here indicates that sales performance varies considerably between regions, which might prompt further investigation.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Region | Sales | |||
| 2 | North | 200 | 118.7734939 | ||
| 3 | South | 450 | |||
| 4 | East | 300 | |||
| 5 | West | 500 | |||
| 6 | Central | 150 | |||
| 7 | Northeast | 350 | |||
| 8 | Southwest | 250 | |||
| 9 | Southeast | 300 | |||
| 10 |
5 Quality control: product weight variation
In a quality control scenario, you measure the weights of ten randomly selected products. The formula =STDEV.S(B2:B11) calculates the sample standard deviation of the weights. With a mean weight of 50.3 grams, the standard deviation is about 1.49 grams. This low variation suggests the production process is consistent and within acceptable limits.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Product ID | Weight (g) | |||
| 2 | P1 | 50.1 | 0.8165646195 | ||
| 3 | P2 | 49.8 | |||
| 4 | P3 | 50.5 | |||
| 5 | P4 | 51.2 | |||
| 6 | P5 | 48.9 | |||
| 7 | P6 | 50 | |||
| 8 | P7 | 49.5 | |||
| 9 | P9 | 50.8 | |||
| 10 | P10 | 51 | |||
| 11 | P11 | 51.5 | |||
| 12 |
Common STDEV.S errors and how to fix them
| Error | Why it happens | How to fix it |
|---|---|---|
| #DIV/0! | The range contains fewer than two numeric values, so the sample standard deviation cannot be calculated. | Ensure the range includes at least two numbers. Check for empty cells or text that might be ignored. |
| #VALUE! | One or more arguments are text values that cannot be converted to numbers, and they are not in a range reference. | Remove or correct text entries. If text is in a range, STDEV.S ignores it; if entered directly as an argument, it causes an error. |
| #NUM! | The calculation results in an invalid number, often due to extremely large values causing overflow. | Check for unusually large numbers and consider scaling your data. |
| #N/A | A referenced cell contains #N/A or another error value. | Clean the data or use IFERROR to handle errors within the range. |
Tips for using STDEV.S
- Use STDEV.S when your data is a sample; use STDEV.P for the entire population.
- STDEV.S ignores text, logical values, and empty cells in ranges, but includes them if typed directly as arguments.
- Combine with AVERAGE to report mean and standard deviation together for a complete picture.
- The result is in the same units as your data, making it easy to interpret.
- For large datasets, consider using STDEV.S with entire column references like
B:Bfor simplicity.
Frequently asked questions
What is the difference between STDEV.S and STDEV.P?
STDEV.S calculates the standard deviation for a sample (using n-1 in the denominator), while STDEV.P calculates it for an entire population (using n). Use STDEV.S when your data is a subset of a larger group.
Can STDEV.S handle text or logical values?
In cell ranges, STDEV.S ignores text, logical values, and empty cells. However, if you type text or logical values directly as arguments (e.g., =STDEV.S(TRUE, 5)), they are evaluated: TRUE becomes 1, FALSE becomes 0, and text causes a #VALUE! error.
Why does STDEV.S return a different result than STDEV?
STDEV is the older function that calculates sample standard deviation, identical to STDEV.S. However, STDEV.S is the modern version recommended for Excel 2010 and later.
What does a standard deviation of zero mean?
A standard deviation of zero indicates that all values in the sample are identical. There is no variation.
Related functions
Every example on this page was recalculated by SheetSkill’s spreadsheet engine. STDEV.S reference