Standard Deviation Calculator

Written by the StepSolvers Team  │  Reviewed by a Math Educator  │  Last updated July 2026

This calculator finds the standard deviation, variance, and mean of any dataset, and shows every step, including the deviation from the mean for each value. Enter your numbers below, separated by commas, for an instant step by step breakdown.

Supports both sample and population data, and automatically applies Bessel's correction (n−1) for samples.

Result

Standard Deviation (s)

Extra: Margin of Error (Confidence Intervals)

What Is Standard Deviation?

Standard deviation measures how spread out the values in a dataset are around the mean. A low standard deviation means the values are clustered close to the mean. A high standard deviation means the values are spread out over a wider range. It is one of the most widely used measures of variability in statistics, written with the symbol σ (sigma) for a population, or s for a sample. Statistics How To's breakdown of standard deviation is a good next stop for more worked examples and edge cases.

Standard Deviation vs Variance

TermMeaning
VarianceThe average of the squared deviations from the mean. Measured in squared units (e.g. squared dollars, squared points).
Standard deviationThe square root of the variance. Measured in the same units as the original data — which is why it's easier to interpret than variance.

Variance and standard deviation always measure the same underlying spread — standard deviation is simply the more interpretable version, since taking the square root returns the value to the original units of the data.

Standard Deviation Formula Explained

Population Standard Deviation

Use the population formula when your dataset includes every member of the group you care about — for example, test scores for an entire class.

σ = √[ Σ(x − μ)² ÷ N ] Where: x = each value in the dataset μ = the population mean (calculate this first with the Average Calculator if you don't already have it) N = the total number of values Σ = "sum of" — add up every squared deviation before dividing

Calculate the mean first with the Average Calculator if you don't already have it.

Sample Standard Deviation (Bessel's Correction)

Use the sample formula when your dataset is only a subset of a larger group — for example, 30 patients out of an entire hospital's records. Dividing by n−1 instead of n is called Bessel's correction, and it corrects for the tendency of a sample to underestimate the true variability of the full population.

s = √[ Σ(x − x̄)² ÷ (n − 1) ] Where: x = each value in the sample x̄ = the sample mean n = the number of values in the sample n − 1 = Bessel's correction — always one less than the sample size

Alternative (Computational) Formula

Both formulas above can also be written without calculating the mean separately first, which is useful when working by hand with a calculator's running-sum keys.

σ = √[ (Σx² ÷ N) − μ² ] (population) s = √[ (Σx² − (Σx)²÷n) ÷ (n − 1) ] (sample)

These give the same result as the main formulas; they simply reorganize the arithmetic so you only need Σx and Σx² rather than every individual deviation.

How to Calculate Standard Deviation (Method)

Whether you're checking the calculator's work or solving by hand, standard deviation always follows the same five steps:

  1. Find the mean. Add up every value and divide by how many values there are.
  2. Subtract the mean from each value. This gives the deviation of each data point.
  3. Square each deviation. This removes negative signs so the deviations don't cancel out when added.
  4. Add the squared deviations, then divide. Divide by N for a population, or n − 1 for a sample (Bessel's correction).
  5. Take the square root. This returns the value to the original units, giving you the standard deviation.

This is exactly the process shown in the calculator's Solution panel above, and worked in full below with several different datasets.

How to Use This Standard Deviation Calculator

  1. Type or paste your numbers into the input field, separated by commas — for example: 2, 4, 4, 4, 5, 5, 7, 9.
  2. Select Population or Sample, depending on whether your data represents the entire group or only part of it.
  3. Click Calculate. The calculator shows the mean, the deviation of each value, the variance, and the standard deviation — with every step of the working.
  4. Use the Coefficient of Variation tab to see the relative standard deviation (RSD) as a percentage of the mean.
  5. Click Reset to clear all inputs and start a new calculation.

The calculator accepts positive numbers, negative numbers, and decimals. There is no limit on dataset size.

Worked Examples — Step by Step

Example 1: Population Standard Deviation

Find the population standard deviation of the dataset: 2, 4, 4, 4, 5, 5, 7, 9

  1. Data: 2, 4, 4, 4, 5, 5, 7, 9 (N = 8)
  2. Mean = (2+4+4+4+5+5+7+9) / 8 = 40 / 8 = 5
  3. Calculate deviations from mean and square them:
Value Mean Deviation (x−μ) Deviation²
25−39
45−11
45−11
45−11
5500
5500
75+24
95+416
Sum of Deviation²:32
  1. Sum of squared deviations = 32
  2. Divide by N = 8 to get the variance: 32 ÷ 8 = 4
  3. Take the square root to get the standard deviation: √4 = 2
Population standard deviation (σ) = 2 │ Variance = 4

Example 2: Sample Standard Deviation (with Bessel's Correction)

A researcher measures 5 tree heights (in feet) from a larger forest: 6, 8, 10, 12, 14. Since this is a sample, not the entire forest, use n−1.

  1. Write out the sample: 6, 8, 10, 12, 14 (n = 5 values)
  2. Find the sample mean: (6+8+10+12+14) ÷ 5 = 50 ÷ 5 = 10
  3. Find each deviation from the mean (x − x̄): −4, −2, 0, 2, 4
  4. Square each deviation: 16, 4, 0, 4, 16
  5. Add the squared deviations: 16+4+0+4+16 = 40
  6. Divide by (n − 1), not n: 40 ÷ (5 − 1) = 40 ÷ 4 = 10
  7. Take the square root: √10 ≈ 3.162
Sample standard deviation (s) ≈ 3.162 │ Sample variance = 10

Why n−1 matters: if this same data were treated as a full population (dividing by N=5 instead of n−1=4), the variance would be 40÷5 = 8 and the standard deviation would be √8 ≈ 2.828 — a smaller, slightly less accurate estimate of the true spread in the forest.

Example 3: Converting Variance to Standard Deviation

A dataset has a known variance of 64. Find the standard deviation.

  1. Start with the variance: 64
  2. Standard deviation is the square root of variance: σ = √64
  3. Calculate: √64 = 8
Standard deviation = 8

Example 4: Relative Standard Deviation (RSD)

A dataset has a mean of 50 and a standard deviation of 5. Find the relative standard deviation as a percentage.

  1. Write the known values: mean = 50, standard deviation = 5
  2. Divide the standard deviation by the mean: 5 ÷ 50 = 0.1
  3. Multiply by 100 to express as a percentage: 0.1 × 100 = 10%
Relative standard deviation (RSD) = 10%

Example 5: The Empirical Rule (68-95-99.7)

An IQ test is designed with a mean of 100 and a standard deviation of 15. Use the empirical rule to find the score ranges.

  1. Write the known values: mean = 100, standard deviation = 15
  2. 68% of scores fall within 1 standard deviation: 100 − 15 = 85 to 100 + 15 = 115
  3. 95% of scores fall within 2 standard deviations: 100 − 30 = 70 to 100 + 30 = 130
  4. 99.7% of scores fall within 3 standard deviations: 100 − 45 = 55 to 100 + 45 = 145
68% fall between 85–115 │ 95% between 70–130 │ 99.7% between 55–145

Example 6: Dataset with Negative Numbers

Find the population standard deviation of the dataset: −4, −2, 0, 2, 4

  1. Data: −4, −2, 0, 2, 4 (N = 5)
  2. Mean = (−4 + −2 + 0 + 2 + 4) ÷ 5 = 0 ÷ 5 = 0
  3. Deviations from mean (same as the original values, since mean = 0): −4, −2, 0, 2, 4
  4. Squared deviations: 16, 4, 0, 4, 16
  5. Sum of squared deviations: 16 + 4 + 0 + 4 + 16 = 40
  6. Divide by N = 5: 40 ÷ 5 = 8
  7. Take the square root: √8 ≈ 2.828
Population standard deviation (σ) ≈ 2.828 │ Variance = 8

Negative values square to positive numbers just like positive ones, so the sign of the original data never affects the final standard deviation.

Example 7: Dataset with Decimal Values

Find the sample standard deviation of the dataset: 2.5, 3.1, 2.8, 3.4, 2.9

  1. Data: 2.5, 3.1, 2.8, 3.4, 2.9 (n = 5)
  2. Mean = (2.5+3.1+2.8+3.4+2.9) ÷ 5 = 14.7 ÷ 5 = 2.94
  3. Deviations from mean: −0.44, 0.16, −0.14, 0.46, −0.04
  4. Squared deviations: 0.1936, 0.0256, 0.0196, 0.2116, 0.0016
  5. Sum of squared deviations: 0.452
  6. Divide by (n − 1) = 4: 0.452 ÷ 4 = 0.113
  7. Take the square root: √0.113 ≈ 0.336
Sample standard deviation (s) ≈ 0.336 │ Sample variance ≈ 0.113

Rounding matters with decimal data: keep at least 3–4 decimal places through each intermediate step, and only round the final answer, to avoid compounding rounding errors.

Choosing the Right Approach

When to Use Standard Deviation

Standard deviation is used anywhere you need to understand how spread out a dataset is, not just its average. Common situations include:

Population vs Sample: Which Should You Use?

Choosing the right formula matters — using the wrong one gives a slightly wrong answer, especially with small datasets.

RuleWhen it applies
Use Population (÷N) when:Your dataset includes every member of the group you're studying — for example, the ages of every employee at a small company.
Use Sample (÷n−1) when:Your dataset is only a subset of a larger group you want to draw conclusions about — for example, a survey of 200 people meant to represent an entire country.

As a dataset gets larger, the difference between dividing by n and n−1 shrinks. For very large samples, the two formulas produce nearly identical results. For small samples, the choice matters more, which is why Bessel's correction exists in the first place.

Common Mistakes to Avoid

  • Using the wrong denominator: dividing by N when the data is actually a sample (or by n−1 when it's a full population) is the most common error — always confirm which formula applies before calculating.
  • Forgetting to square the deviations: raw deviations from the mean always sum to zero, which is why they must be squared before adding — skipping this step gives a meaningless result.
  • Reporting variance instead of standard deviation: variance and standard deviation are related but not interchangeable — forgetting the final square root step reports a number in the wrong units.
  • Confusing standard deviation with standard error: these measure different things and don't shrink the same way as sample size changes.

Real-World Applications of Standard Deviation

Standard deviation is widely used in experimental and industrial settings to test models against real-world data.

Finance and Investing

In finance, standard deviation is used to measure the risk of an investment's returns. For example, comparing Stock A with an average return of 7% and a standard deviation of 10% against Stock B with the same average return but a standard deviation of 50%, Stock A is clearly the more predictable choice, since its returns cluster much more tightly around 7%. Stock B could just as easily post a much larger gain or a much larger loss for the same average performance.

Weather and Climate

Two cities can share the same average temperature yet feel very different. A coastal city and an inland city might both average 75°F over a year, but the coastal city, moderated by the ocean, could stay within 60°F to 85°F, while the inland city swings from 30°F to 110°F. Comparing only the averages hides this difference; the standard deviation reveals it.

Quality Control

Manufacturers use standard deviation to set acceptable tolerance ranges for a product. If a machined part's measurements have a low standard deviation, the production process is consistent. A rising standard deviation over time is often an early warning sign that equipment needs calibration, even before any individual part fails inspection.

The Empirical Rule, Standard Error, and Relative Standard Deviation

The Empirical Rule (68-95-99.7 Rule)

For data that follows a normal distribution (a symmetric bell curve), the empirical rule describes how much of the data falls within each range of standard deviations from the mean:

RangePercentage of data
Within 1 standard deviationAbout 68% of all values
Within 2 standard deviationsAbout 95% of all values
Within 3 standard deviationsAbout 99.7% of all values

Standard Deviation vs Standard Error

These two terms are often confused. Standard deviation describes the spread of the raw data itself. Standard error describes how much a sample mean is likely to vary from the true population mean, and it shrinks as the sample size grows — standard deviation does not shrink with a larger sample.

Relative Standard Deviation (RSD)

Relative standard deviation — also called the coefficient of variation — expresses the standard deviation as a percentage of the mean, using the same conversion the Percentage Calculator performs. This makes it possible to compare the spread of two datasets that use different units or very different averages.

RSD = (standard deviation ÷ mean) × 100

References

Frequently Asked Questions

What is standard deviation?
Standard deviation is a number that shows how spread out the values in a dataset are around the mean. A small standard deviation means the values are close together. A large standard deviation means the values are spread out over a wide range. It is written as σ for a population and s for a sample.
How do you calculate standard deviation?
Find the mean of the dataset, subtract the mean from each value to get the deviations, square each deviation, add them up, divide by N (population) or n−1 (sample), then take the square root of the result. For example, the dataset 2, 4, 4, 4, 5, 5, 7, 9 has a mean of 5 and a population standard deviation of 2.
What is the difference between standard deviation and variance?
Variance is the average of the squared deviations from the mean, measured in squared units. Standard deviation is the square root of the variance, which brings the result back into the same units as the original data.
What is the difference between sample and population standard deviation?
Population standard deviation divides by N and is used when your data covers an entire group. Sample standard deviation divides by n−1 (Bessel's correction) and is used when your data is only a subset meant to represent a larger group.
What does the empirical rule (68-95-99.7 rule) mean?
For data that follows a normal distribution, about 68% of values fall within 1 standard deviation of the mean, 95% fall within 2 standard deviations, and 99.7% fall within 3 standard deviations. For example, with a mean of 100 and a standard deviation of 15, 68% of values fall between 85 and 115.
What is the difference between standard deviation and standard error?
Standard deviation measures the spread of the raw data itself and does not change based on sample size. Standard error measures how much a sample mean is likely to differ from the true population mean, and it gets smaller as the sample size increases.
What is relative standard deviation (RSD)?
Relative standard deviation, also called the coefficient of variation, expresses the standard deviation as a percentage of the mean: RSD = (standard deviation ÷ mean) × 100. It is useful for comparing the spread of two datasets that use different units.
Can standard deviation be negative?
No. Standard deviation is always zero or a positive number, because it comes from a square root of squared values, which can never be negative. A standard deviation of zero means every value in the dataset is exactly the same.

Related Calculators

Average Calculator
Find the mean, median, mode, and weighted average of any dataset — the same mean used in every standard deviation calculation.
Square Root Calculator
Simplify square roots to exact radical form — useful when a variance doesn't reduce to a whole number.
Percentage Calculator
Convert a relative standard deviation into a percentage, or calculate percent increase, decrease, and percent error.