Standard Deviation Calculator
Enter your data set to find the standard deviation, variance, and mean, with full step-by-step working. Choose population or sample depending on whether your data is the whole group or a sample from it.
Paste your numbers, pick sample or population, and this standard deviation calculator returns the SD, mean, and variance with every step shown. No formulas to memorize, no manual arithmetic.
Below you will find the exact standard deviation formula, a step-by-step method you can do by hand, several solved homework examples using real data sets, plus how to get the same answer in Excel. Whether you need the sample standard deviation (divide by n − 1) or the population standard deviation (divide by N), the calculator picks the right formula the moment you choose your option.
Standard deviation tells you how far, on average, your numbers sit from the mean. To calculate it: find the mean, subtract it from every value, square those differences, average the squares (divide by N for a population or by n − 1 for a sample), then take the square root. For the data set 4, 7, 9, 12, 15, the population standard deviation is 3.8262 and the sample standard deviation is 4.2778.
What Is Standard Deviation?
Standard deviation measures how spread out a set of numbers is around its average. A small value means the data points cluster tightly near the mean. A large value means they are scattered far from it.
Say two classes both average 70 on a test. In one class every score lands between 66 and 74. In the other, scores run from 40 to 95. Same average, very different spread. Standard deviation is the number that captures that difference.
It is written with the Greek letter sigma (σ) for a population and the letter s for a sample. Standard deviation is the square root of the variance, so the two always travel together: square the standard deviation and you get the variance, take the square root of the variance and you get the standard deviation back. For a spread measure that reacts less harshly to outliers, the mean absolute deviation calculator averages plain distances instead of squared ones.
Standard Deviation Formula
There are two versions of the formula. Which one you use depends on whether your numbers are the entire group (a population) or just a slice of it (a sample).
Population Standard Deviation Formula (σ)
Use this when your data includes every member of the group you care about.
σ = √[ Σ(x − μ)² / N ]
Here μ (mu) is the population mean and N is the total count of values.
Sample Standard Deviation Formula (s)
Use this when your data is a sample drawn from a larger population, which is the case in most real statistics work.
s = √[ Σ(x − x̄)² / (n − 1) ]
Here x̄ (x-bar) is the sample mean and n is the number of values. You divide by n − 1 instead of n. This is called Bessel’s correction, and it slightly increases the result to make up for the fact that a sample tends to underestimate the true spread of the full population.
Quick rule: If you measured everyone or everything in the group, use population (÷ N). If you measured only some of them and want to estimate the whole, use sample (÷ n − 1). When in doubt in a stats class, most textbook problems ask for the sample standard deviation.
How Do You Calculate Standard Deviation Step by Step?
Here is the manual method the calculator runs for you. Five steps, no shortcuts skipped. Once you have the number, what standard deviation looks like on a graph shows how it maps onto the curve, which is usually where it finally makes sense.
- Find the mean. Add every value and divide by the count.
- Subtract the mean from each value. This gives you the deviation of each point.
- Square each deviation. Squaring removes the negative signs and weights larger gaps more heavily.
- Add the squared deviations and divide. Divide by N for a population, or by n − 1 for a sample. This result is the variance.
- Take the square root of the variance. That final number is your standard deviation.
Standard Deviation Example (Full Worked Solution)
Data set: 4, 7, 9, 12, 15
Step 1 — Find the mean
(4 + 7 + 9 + 12 + 15) ÷ 5 = 47 ÷ 5 = 9.4
Step 2 — Deviations and squared deviations
| Value (x) | x − mean | (x − mean)² |
|---|---|---|
| 4 | −5.4 | 29.16 |
| 7 | −2.4 | 5.76 |
| 9 | −0.4 | 0.16 |
| 12 | 2.6 | 6.76 |
| 15 | 5.6 | 31.36 |
| Total | 73.2 |
Step 3 — Variance
Population: 73.2 ÷ 5 = 14.64
Sample: 73.2 ÷ (5 − 1) = 73.2 ÷ 4 = 18.3
Step 4 — Square root
Population SD: √14.64 = 3.8262
Sample SD: √18.3 = 4.2778
Population σ = 3.8262 | Sample s = 4.2778
More Solved Standard Deviation Problems
These are exact data sets people search for and paste into the calculator. Each one is fully worked so you can check your own homework answer.
Find the sample standard deviation of 48, 47, 50, 52, 27, 41, 15
Mean = 280 ÷ 7 = 40. Sum of squared deviations = 1152.
Sample variance = 1152 ÷ (7 − 1) = 1152 ÷ 6 = 192
Sample standard deviation = √192 = 13.856 (to the nearest thousandth)
For comparison, the population SD = √(1152 ÷ 7) = 12.828
Standard deviation of 10, 12, 23, 23, 16, 23, 21, 16
Mean = 144 ÷ 8 = 18. Sum of squared deviations = 192.
Population SD = √(192 ÷ 8) = √24 = 4.899
Sample SD = √(192 ÷ 7) = √27.4286 = 5.2372
Standard deviation of 2, 4, 4, 4, 5, 5, 7, 9
Mean = 40 ÷ 8 = 5. Sum of squared deviations = 32.
Population SD = √(32 ÷ 8) = √4 = 2
Sample SD = √(32 ÷ 7) = √4.5714 = 2.1381
This is the classic textbook set where the population standard deviation comes out to a clean 2.
Standard deviation of 5, 10, 15
Mean = 30 ÷ 3 = 10. Sum of squared deviations = 50.
Population SD = √(50 ÷ 3) = √16.6667 = 4.0825
Sample SD = √(50 ÷ 2) = √25 = 5
How to Calculate Standard Deviation in Excel
Excel has built-in functions, so you never type the formula by hand. Put your numbers in a column, then use the function that matches your case.
| What you want | Excel function | Example |
|---|---|---|
| Sample standard deviation | =STDEV.S(range) | =STDEV.S(A1:A20) |
| Population standard deviation | =STDEV.P(range) | =STDEV.P(A1:A20) |
| Sample variance | =VAR.S(range) | =VAR.S(A1:A20) |
| Population variance | =VAR.P(range) | =VAR.P(A1:A20) |
| Mean (average) | =AVERAGE(range) | =AVERAGE(A1:A20) |
The older functions =STDEV() and =STDEVP() still work in current Excel and return the sample and population values respectively, but Microsoft recommends the newer =STDEV.S and =STDEV.P versions. Google Sheets uses the exact same function names. The variance functions follow the identical pattern, so if you understand VAR.S and VAR.P in Excel the standard deviation ones need no extra learning.
Standard Deviation Symbols and Notation
Statistics notation trips a lot of people up, so here is what each symbol means at a glance.
| Symbol | Meaning |
|---|---|
| σ (sigma) | Population standard deviation |
| σ² (sigma squared) | Population variance |
| s | Sample standard deviation |
| s² | Sample variance |
| μ (mu) | Population mean |
| x̄ (x-bar) | Sample mean |
| N | Population size (count) |
| n | Sample size (count) |
| Σ (sigma, capital) | Sum of, add everything that follows |
What Is the Difference Between Sample and Population Standard Deviation?
The math is almost identical. The only change is the denominator. Population divides the sum of squared deviations by N. Sample divides by n − 1.
Because n − 1 is smaller than n, the sample standard deviation always comes out a little larger than the population value for the same numbers. You saw this in the examples above: for 4, 7, 9, 12, 15 the population SD was 3.8262 while the sample SD was 4.2778. The gap shrinks as your data set grows, and with hundreds of values the two are nearly identical.
In practice you almost never have data on an entire population, so real-world research, surveys, and quality testing use the sample standard deviation. Population SD shows up mainly in textbook problems that hand you the full group.
What Does Standard Deviation Tell You? (Real Examples)
Test Scores
Scores of 44, 48, 50, 46, 47 have a mean of 47 and a population SD of just 2. Everyone performed within a few points of each other, so the class was consistent.
Stock Returns
Monthly returns of −2%, 12%, −8%, 20%, −10% swing wildly around their average. A high standard deviation here signals a volatile, higher-risk investment. This is why standard deviation is the standard measure of risk in finance.
Manufacturing Quality
Parts measuring 10.2, 10.1, 9.9, 10.0 mm have a tiny standard deviation, which tells a factory its process is tight and reliable. A rising SD is an early warning that something on the line is drifting out of spec.
The 68-95-99.7 Rule
For data that follows a normal (bell-shaped) distribution, standard deviation has a handy interpretation known as the empirical rule:
- About 68% of values fall within 1 standard deviation of the mean.
- About 95% fall within 2 standard deviations.
- About 99.7% fall within 3 standard deviations.
So if a test has a mean of 500 and a standard deviation of 100, roughly 95% of scores land between 300 and 700. This rule is also the backbone of confidence intervals, where the standard deviation sets the width of the range you report.
Common Standard Deviation Mistakes
- Mixing up sample and population, dividing by n when the problem wants n − 1.
- Forgetting to square the deviations before adding them.
- Stopping at the variance and forgetting the final square root.
- Using the wrong mean, the calculator recomputes the mean, median, and mode for you so this cannot happen.
- Rounding the mean too early, which throws off every deviation that follows. Keep full decimals until the end.
- Leaving stray text or units in the data, only clean numeric values should go in.
How to Find Standard Deviation From the Mean
You cannot get standard deviation from the mean alone. The mean tells you the center, but standard deviation needs to know how far every individual value sits from that center. You always need the full data set (or a summary like the sum of squared deviations) to compute it. If someone gives you only the mean and asks for the standard deviation, the problem is missing information.
Frequently Asked Questions
How do you calculate standard deviation quickly?
Paste your numbers into the calculator above, choose sample or population, and click Calculate. It returns the standard deviation, mean, variance, and range along with the full worked steps. By hand, follow the five-step method: mean, deviations, square them, average the squares, square root.
What is a good standard deviation?
There is no universal “good” value, it depends entirely on your data and units. A standard deviation is only meaningful next to the mean. As a rough guide, a standard deviation that is small relative to the mean means consistent data, while one that is large relative to the mean means high variability. To compare spread across different data sets fairly, use the coefficient of variation, which divides SD by the mean.
Can standard deviation be negative?
No. Standard deviation is a square root of squared values, so it is always zero or positive. The only way to get zero is when every number in the set is identical.
How do you calculate variance from standard deviation?
Square the standard deviation. If the standard deviation is 5, the variance is 25. Going the other way, take the square root of the variance to get the standard deviation.
Why divide by n − 1 for a sample?
A sample tends to cluster a bit tighter than the full population it came from, which would make the standard deviation too small. Dividing by n − 1 instead of n bumps the result up slightly to correct that bias. This adjustment is called Bessel’s correction.
What is 1 standard deviation from the mean?
It is the range from (mean − SD) to (mean + SD). For a mean of 50 and a standard deviation of 10, one standard deviation from the mean covers 40 to 60. In a normal distribution, about 68% of all values fall inside that range.