What Is Standard Deviation and How Is It Calculated? Variance Explained With Examples
Updated: October 13, 2026 · AracMerkezi
▶ Open Median, Mode and Standard Deviation Calculator
The grade averages of two classes can be the same, yet the grades can be distributed very differently: in one, everyone got around 70; in the other, some got 50 and some 90. The mean does not show this difference. How close to or far from the mean the data is is described by the standard deviation. In this guide we will calculate variance and standard deviation step by step with examples, and see the difference between a population and a sample and how to interpret the results.
The basic idea
Standard deviation measures how far, on average, the values stray from the mean. A small standard deviation shows that the values are clustered close to the mean; a large standard deviation shows that the values are spread over a wide range. Its unit is the same as the data's own unit (grade, weight, ₺).
Step-by-step calculation
- Find the mean.
- Calculate the difference of each value from the mean.
- Square each difference.
- Find the sum of the squares.
- Divide the sum by the divisor: n for a population, n − 1 for a sample. This result is the variance.
- Take the square root of the variance. This is the standard deviation.
Example 1: 2, 4, 4, 4, 5, 5, 7, 9
The number of values is 8, the total is 40; the mean is 5.
| Value | Difference | Square of the difference |
|---|---|---|
| 2 | −3 | 9 |
| 4 | −1 | 1 |
| 4 | −1 | 1 |
| 4 | −1 | 1 |
| 5 | 0 | 0 |
| 5 | 0 | 0 |
| 7 | 2 | 4 |
| 9 | 4 | 16 |
The sum of squares is 32.
- Population variance: 32 / 8 = 4; standard deviation = √4 = 2
- Sample variance: 32 / 7 ≈ 4.57; standard deviation ≈ 2.14
Example 2: The same mean, a different distribution
The exam grades of two groups:
- Group A: 60, 65, 70, 75, 80 (mean 70)
- Group B: 50, 60, 70, 80, 90 (mean 70)
Group A's sum of squares is 100 + 25 + 0 + 25 + 100 = 250. The population variance is 50, the standard deviation ≈ 7.07. The sample variance is 62.5; the standard deviation ≈ 7.91.
Group B's sum of squares is 400 + 100 + 0 + 100 + 400 = 1,000. The population variance is 200, the standard deviation ≈ 14.14. The sample variance is 250; the standard deviation ≈ 15.81.
The two groups have the same mean (70), but Group B's standard deviation is about twice as large; the grades are much more spread out. Knowing the mean is not enough to show this difference.
Population or sample?
- Population: If you have the entirety of the group you are interested in. For example, the grades of all 30 students in a class. The divisor is n.
- Sample: If you have measured only a portion of a larger group. For example, you examined 200 of 10,000 students. The divisor is n − 1.
Why n − 1 for a sample? Because the sample's mean is closer to the data than the population mean is, the raw calculation shows the spread as smaller than it is. Dividing by n − 1 instead of n corrects this tendency (Bessel's correction). As the number of values increases, the two results get closer together. If you are unsure and took your data from a larger group, use the sample formula.
How is standard deviation interpreted?
If the data roughly resembles a bell curve (normal distribution), this rule is useful:
- About 68% of the values are within ±1 standard deviation of the mean.
- About 95% are within ±2 standard deviations.
- About 99.7% are within ±3 standard deviations.
Example: if an exam has a mean of 70 and a standard deviation of 10, about two-thirds of the students scored between 60 and 80; about 95% are between 50 and 90. This rule is not reliable if the distribution is skewed or there are many extreme values.
Coefficient of variation
To compare the spread of data in different units, you divide the standard deviation by the mean and express it as a percentage. For Group B, 14.14 / 70 ≈ 20.2%; for Group A, 7.07 / 70 ≈ 10.1%. This ratio shows how large the standard deviation is relative to the mean.
Where is it used?
- Grades: Understanding the distribution of a class's performance.
- Finance: Measuring the volatility in an investment's return (for informational purposes; not investment advice).
- Manufacturing: Checking the consistency of product dimensions.
- Sports and health: Seeing how much measurements vary.
Common mistakes
- Forgetting the square root. The value you get after dividing the sum of squares is the variance; take the square root for the standard deviation.
- Mixing up the unit. The unit of variance is squared (grade², ₺²); the unit of standard deviation is the same as the data itself.
- Using the wrong divisor. Use n − 1 for a sample and n for a population.
- Summing the differences without squaring them. The sum of deviations from the mean is always zero; that is why they are squared.
- Ignoring extreme values. Standard deviation is strongly affected by extreme values; with skewed data, also examine the median and the quartiles.
- Settling for a single number. Report the mean and the standard deviation together.
Related guides
To understand the center of the data, see the article The Difference Between Mean, Median and Mode, and for weighted grade calculation, see the Midterm-Final Average guide. To quickly find the average of your grades, there is also the Midterm-Final Average Calculator tool.
Z-score: how many standard deviations from the mean is a value?
The z-score shows how many standard deviations a value is from the mean: z = (value − mean) / standard deviation. If an exam has a mean of 70 and a standard deviation of 10, the z-score of a student who got 85 is (85 − 70) / 10 = 1.5; that is, one and a half standard deviations above the mean. The z-score of a student who got 55 is −1.5. The z-score is useful for comparing grades from different exams: a student with z = 1.5 on exam A and z = 0.5 on exam B performed better relative to their own group on exam A.
A small reminder: mean absolute deviation
Because standard deviation squares the differences, it penalizes large deviations more. Alternatively, the mean of the absolute values of the differences (mean absolute deviation) is also used; it is less sensitive to extreme values but is not as common mathematically as standard deviation. Be sure to state in your report which measure you used.
How do you use the tool?
In the Median, Mode and Standard Deviation Calculator tool, enter your numbers separated by spaces or on separate lines; use a period for decimal numbers. The tool shows both the population and the sample variance and standard deviation, so you can choose the one suited to your data. It also gives the count, sum, mean, median, mode, minimum, maximum and range. The calculation is done in your browser; your data is not sent to a server. For a simple mean, you can use the Average Calculator tool.
Frequently asked questions
What is the difference between population and sample standard deviation?
For a population, the sum of squares is divided by n; for a sample, by n − 1. If you have all of the data, use the population formula; if you measured only a portion, use the sample formula.
What does it mean if the standard deviation is zero?
It means all the values are equal to each other; there is no spread in the data.
What is the relationship between variance and standard deviation?
Standard deviation is the square root of the variance. The unit of variance is the square of the data's unit, while the unit of standard deviation is the data's own unit.
Tools mentioned in this guide
More guides
- How to Calculate an Average: Arithmetic, Weighted and Geometric Mean – How to calculate an average: arithmetic, weighted, geometric and harmonic means, when median and mode work better, with worked examples.
- How to Calculate an Exam Net Score: YKS, KPSS and LGS Net Calculation – How do you calculate net from right and wrong answers? The 4-wrongs rule, the 3-wrongs rule in LGS, blank-vs-guess math and subject-by-subject examples.
- How to Calculate the Midterm-Final Average: Weighted Grade Average and Passing Math – How do you calculate an average with a 40% midterm and 60% final? The weighted-average formula, a needed-final table, multi-component grades, thresholds.
- What Is the Difference Between Mean, Median and Mode? When to Use Which – What are the mean, median and mode? How they are calculated, the effect of outliers, salary and home price examples, when to use each, and common mistakes.
- How to Calculate GANO and AGNO: A Guide to Letter Grades and the 4-Point Scale – AGNO vs. GANO and letter grade points on the 4-point scale. Credit-weighted math, merging with a previous GANO, retakes and target GANO examples.
Important note: Results are estimates based on published coefficients and guides and do not replace official results. For exact information, rely on announcements from ÖSYM, MEB, YÖK or your school.
This article is for general information only and is not legal, financial or medical advice. We are not an official institution.