Standard Deviation Calculator

Standard deviation measures how far data values typically sit from their mean. For 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5, the population standard deviation is 2 and the sample standard deviation is 2.1381. Paste your numbers above and choose sample (n − 1) or population (N).

Last updated · By · Runs in your browser, nothing is uploaded

Data type
Advanced options
Result
Standard deviation—
Variance—
Mean—
Count (n)—
Sum—
Median—
Min / Max—
Std. error (SEM)—
Coeff. of variation—

Step-by-Step Solution

Enter your values above to see the full working.

What Is Standard Deviation?

Standard deviation is the most widely used measure of spread. It tells you the typical distance between each value in a dataset and the dataset’s mean, in the same units as the data itself. A small standard deviation means the values cluster tightly around the average. A large one means they are scattered.

The mean alone never tells the whole story. Two classes can both average 70% on a test, yet in one class almost everyone scored between 65 and 75 while in the other the marks ran from 30 to 100. Standard deviation is the number that separates those two situations, which is why it appears in quality control, finance, medicine, psychology and every introductory statistics course.

Sample vs Population Standard Deviation

Population (σ)Sample (s)
Use it whenYou have every value in the group you care aboutYour data is a subset used to estimate a larger group
Divides the sum of squares byNn − 1
Symbol for the meanμx̄
Typical examplesAll 30 students in one class; every unit in a small batchA survey of 500 customers; 20 measurements from a production line
Result for 2, 4, 4, 4, 5, 5, 7, 922.1381

If you are unsure which to choose, use the sample version. Most real datasets are samples, and dividing by n − 1 corrects the small bias that appears when you estimate spread from only part of a population.

Standard Deviation Formula

The two formulas differ only in the divisor:

Population: σ = √[ Σ(xᵢ − μ)² ÷ N ] Sample: s = √[ Σ(xᵢ − x̄)² ÷ (n − 1) ]
  • xᵢ is each individual value in the dataset.
  • μ or x̄ is the mean: the sum of the values divided by how many there are.
  • (xᵢ − mean)² is the squared distance of a value from the mean. Squaring removes the sign so that values above and below the mean do not cancel out.
  • Σ means “add up all of these”.
  • N is the number of values in a population, and n is the number in a sample.
  • The square root at the end converts the result from squared units back to the original units.

The quantity under the square root is the variance. Standard deviation is simply the square root of variance, which is why most people find it easier to interpret.

Worked Example: Step-by-Step Standard Deviation

Take the dataset preloaded in the calculator: 2, 4, 4, 4, 5, 5, 7, 9.

  1. Count the values: n = 8.
  2. Find the mean: (2 + 4 + 4 + 4 + 5 + 5 + 7 + 9) ÷ 8 = 40 ÷ 8 = 5.
  3. Subtract the mean from each value: −3, −1, −1, −1, 0, 0, 2, 4.
  4. Square each difference: 9, 1, 1, 1, 0, 0, 4, 16.
  5. Add the squares: 9 + 1 + 1 + 1 + 0 + 0 + 4 + 16 = 32.
  6. Population variance: 32 ÷ 8 = 4, so σ = √4 = 2.
  7. Sample variance: 32 ÷ 7 = 4.5714, so s = √4.5714 = 2.1381.

Why the Spread Matters: Same Mean, Different Story

Compare two small datasets that both average exactly 50.

DatasetValuesMeanSample SD
A48, 49, 50, 51, 52501.5811
B30, 40, 50, 60, 705015.8114

The means are identical, yet dataset B is ten times more spread out. Reporting only the mean would hide that completely.

How to Use This Standard Deviation Calculator

  1. Type or paste your numbers into the box. Commas, spaces and new lines all work, so you can paste a spreadsheet column directly.
  2. Choose Sample (n − 1) if your data is a sample, or Population (N) if it covers the whole group.
  3. Read the standard deviation, variance, mean, count, sum, median, minimum and maximum, standard error and coefficient of variation. Everything updates as you type.
  4. Open the table under the results to see each value, its distance from the mean and the squared distance, then scroll to the step-by-step solution for the full working.
  5. Use Copy result or Share link to reuse the answer.

If a value is rejected, the error names the first entry that is not a number. Remove currency symbols, percent signs and thousands separators before pasting.

Where Standard Deviation Is Used

  • Quality control: manufacturers track the standard deviation of part dimensions. A rising value signals that a machine is drifting even if the average still looks fine.
  • Finance: the standard deviation of returns is the standard measure of volatility. Two funds with the same average return can carry very different risk.
  • Education and testing: standardised tests are scaled so that scores have a known mean and standard deviation, which lets you compare a result across different years or exams using z-scores.
  • Science and medicine: researchers report mean ± standard deviation for measurements such as blood pressure, and use it to judge whether a reading is unusual.
  • Weather and sport: a city with a small spread in daily temperature feels very different from one with the same average but wild swings.

The 68–95–99.7 Rule

For data that follows a bell-shaped (normal) distribution, about 68% of values fall within one standard deviation of the mean, about 95% within two, and about 99.7% within three. With a mean of 70 and a standard deviation of 10, roughly 95% of results would lie between 50 and 90. Try the empirical rule calculator to see these ranges for your own numbers.

What Are the Most Common Mistakes With the Standard Deviation Calculator?

  • Choosing the wrong divisor. Using N for a sample understates the spread. Using n − 1 for a full population overstates it.
  • Forgetting the square root. Reporting 4.5714 when you mean 2.1381 gives the variance, not the standard deviation.
  • Comparing across different units. A standard deviation of 5 kg and one of 5 cm cannot be compared. Use the coefficient of variation (SD ÷ mean) to compare spread across different scales.
  • Assuming a bell curve. The 68–95–99.7 rule only holds for roughly normal data. Skewed data such as incomes breaks it badly.
  • Ignoring outliers. One extreme value inflates the standard deviation sharply because differences are squared. Check your data with the outlier calculator first.
  • Using it on tiny samples. With only two or three values the estimate is very unstable, however carefully you calculate it.

Standard deviation describes spread around the mean. It does not tell you about the shape of the distribution, and it says nothing about why the data varies.

Where Can You Verify These Formulas?

The definitions and formulas on this page follow standard references. Check them against these sources:

Built and maintained by S. Dilshan. Found a mistake? Email [email protected] with the page address.

Frequently Asked Questions

What is the difference between sample and population standard deviation?

Population standard deviation divides the sum of squared differences by N and is used when you have every value in the group. Sample standard deviation divides by n − 1 and is used when your data is only a subset. The sample version is slightly larger and corrects for the bias that comes from estimating spread from limited data.

How do you calculate standard deviation step by step?

Find the mean, subtract it from every value, square each difference, add the squares, divide by N (population) or n − 1 (sample), then take the square root. For 2, 4, 4, 4, 5, 5, 7, 9 the sum of squares is 32, giving σ = 2 and s = 2.1381.

What does a high or low standard deviation mean?

A low standard deviation means values are close to the mean, so the data is consistent. A high one means values are widely spread. What counts as high depends on the scale of the data, so compare it with the mean or use the coefficient of variation.

Can standard deviation be negative or zero?

It can never be negative because it is a square root of a sum of squares. It is zero only when every value in the dataset is identical.

What is the difference between standard deviation and variance?

Variance is the average squared distance from the mean, and standard deviation is its square root. Standard deviation is in the same units as the data, which makes it easier to interpret.

Is standard deviation affected by outliers?

Yes, strongly. Because each difference from the mean is squared, a single extreme value can raise the standard deviation a lot. Check for outliers before relying on the result.