What Is Mean and Standard Deviation?
The mean tells you where the centre of your data is, and the standard deviation tells you how far values typically sit from that centre. Together they are the two numbers most often quoted to summarise a data set, which is why this calculator returns them side by side.
Pick sample or population data: a sample standard deviation divides by n − 1, a population standard deviation divides by n. The results also include the sample variance, the standard error of the mean, the coefficient of variation and how many values fall within one and two standard deviations of the mean.
The sections below explain the formulas, define every variable, work through an example by hand and answer common questions about standard deviation, variance and when to use n or n − 1.
How to Use the Mean and Standard Deviation Calculator
- Type or paste your numbers into the box, separated by commas, spaces or new lines.
- Choose Sample if the numbers are a subset drawn from a bigger group, or Population if they are every value you care about.
- Read the mean and standard deviation at the top. Open "Show step-by-step solution" to see the working, and check the chart to see how the data spreads around the mean.
Mean and Standard Deviation Formula
Mean
Sample standard deviation
Dividing by n − 1 (Bessel's correction) corrects the bias that comes from estimating the mean from the same data.
Population standard deviation
Standard error of the mean
| Sample (s) | Population (σ) | |
|---|---|---|
| Use when | Your data is a subset of a larger group | Your data is every member of the group |
| Divides by | n − 1 | n |
| Symbol | s | σ |
| Typical example | Heights of 30 students from a school | Test scores of every student in one class |
Mean and Standard Deviation Variables Explained
| Symbol | Meaning | Notes |
|---|---|---|
| x̄ | Sample mean | Σx ÷ n |
| μ | Population mean | Used when you have the whole population |
| s | Sample standard deviation | Divides by n − 1 |
| σ | Population standard deviation | Divides by n |
| n | Number of values | |
| s² | Sample variance | The standard deviation squared |
Mean and Standard Deviation Worked Example
Using the example values (press “Load example” above to try them):
- Count the values: n = 8. Add them up: Σx = 40.
- Mean: x̄ = Σx ÷ n = 40 ÷ 8 = 5.
- Subtract the mean from every value, square each difference and add them: Σ(x − x̄)² = 32.
- Population variance: σ² = Σ(x − x̄)² ÷ n = 32 ÷ 8 = 4.
- Standard deviation: σ = √4 = 2.
Result: Population standard deviation (σ) = 2; Mean (x̄) = 5.
How to interpret a standard deviation
A standard deviation is best read as a typical distance from the mean. If test scores average 70 with an SD of 5, most students scored roughly between 65 and 75. If the SD were 20, the class was far more spread out, even though the average is identical.
For bell-shaped data the empirical rule gives concrete expectations, shown in the table below. Real data is rarely perfectly normal, so treat the percentages as a guide, and use the “values within ±k SD” results above to check your own data.
| Range | Share of values (normal data) | Rough meaning |
|---|---|---|
| Mean ± 1 SD | ≈ 68.3 % | Typical values |
| Mean ± 2 SD | ≈ 95.4 % | Almost everything |
| Mean ± 3 SD | ≈ 99.7 % | Beyond this is unusual (outlier territory) |
When the data is not bell-shaped: Chebyshev’s inequality
Chebyshev’s inequality holds for any distribution: at least 1 − 1/k² of the values lie within k standard deviations of the mean. That is at least 75 % within 2 SD and at least 88.9 % within 3 SD. It is a weaker guarantee than the empirical rule but it never fails.
Worked method: the five steps
- Add the values and divide by n to get the mean.
- Subtract the mean from each value to get the deviations.
- Square each deviation so negatives do not cancel positives.
- Add the squares and divide by n (population) or n − 1 (sample) to get the variance.
- Take the square root to return to the original units.
Where the standard deviation is used
- Science: error bars and measurement precision.
- Finance: volatility of returns as a measure of risk.
- Quality control: process capability and control limits (mean ± 3 SD).
- Education: standardising scores into z-scores and percentiles.
- Machine learning: feature scaling (standardisation).
Where Mean and Standard Deviation Is Used
Summarising a data set
Reporting a centre and a spread for test scores, measurements or survey values.
Checking homework
Verifying a hand calculation of mean, variance and standard deviation.
Spotting unusual values
Seeing how many observations lie within one or two standard deviations of the mean.
Preparing for further tests
Getting the mean, SD and n needed for confidence intervals and t-tests.
Common Mean and Standard Deviation Mistakes to Avoid
- Using the population formula on a sample, which understates the spread.
- Forgetting the square root and reporting the variance as the SD.
- Computing the SD of percentages or ranks as if they were interval data without thinking about what it means.
- Letting one typo (for example 1000 instead of 10) dominate the result. Check the box plot for outliers.
- Comparing SDs of data sets with very different means. Use the coefficient of variation instead.
- The standard deviation is in the same units as your data, while the variance is in squared units.
- A single extreme value can raise the standard deviation a lot, so check your data for typos or outliers first.
- With very small samples, s is noticeably larger than σ. The gap shrinks quickly as n grows.
Mean and Standard Deviation Terms and Definitions
- Deviation
- The distance of a value from the mean, x − x̄.
- Variance
- The average squared deviation; the SD squared.
- Bessel’s correction
- Dividing by n − 1 instead of n so the sample variance is unbiased.
- Z-score
- How many standard deviations a value is from the mean.
- Outlier
- A value unusually far from the rest, often defined as beyond 1.5 × IQR from the quartiles.
Mean and Standard Deviation FAQs
How do I calculate standard deviation by hand?
Find the mean, subtract it from each value, square the differences, add them, divide by n − 1 (sample) or n (population) and take the square root. The step-by-step panel above shows each stage for your data.
What is a low or high standard deviation?
A low SD means values cluster near the mean; a high SD means they are widely spread. Judge it relative to the mean and the context, for example with the coefficient of variation.
What is the difference between variance and standard deviation?
Variance is the average squared deviation and is in squared units. The standard deviation is its square root, so it is in the same units as the data and easier to interpret.
How many values do I need?
At least 2 for a sample SD. In practice 30 or more values give a stable estimate, and with very small samples the SD is itself quite uncertain.
Can I calculate the SD from a frequency table?
Yes, but this tool takes raw values. For grouped data use the standard deviation for grouped data calculator.
What does “within one standard deviation” mean?
Values whose distance from the mean is at most one SD. For normal data about 68 % of values fall there.
Is a bigger sample SD always better or worse?
Neither. In measurement a small SD means precision, in investing a large SD means higher risk, and in some contexts diversity is desirable.
Should I use the sample or the population standard deviation?
Use the sample version (divide by n − 1) when your numbers are a sample taken from a larger group and you want to estimate that group's spread. Use the population version (divide by n) only when your list contains every value in the group.
Why does the sample formula divide by n − 1?
The sample mean is calculated from the same data, so the values sit slightly closer to it than to the true mean. Dividing by n − 1 instead of n compensates for that and gives an unbiased estimate of the variance.
What is a good or bad standard deviation?
There is no universal good value. It depends on the scale of your data. To compare spread between data sets with different units or means, divide the standard deviation by the mean to get the relative standard deviation (coefficient of variation).
Can the standard deviation be negative or zero?
It can never be negative. It is zero only when every value is identical.
What is the difference between standard deviation and standard error?
Standard deviation describes how spread out the individual values are. Standard error describes how precisely the sample mean estimates the true mean, and equals the standard deviation divided by √n.