Skip to content

Standard Deviation Calculator: Sample vs Population

This standard deviation calculator (sample vs population) turns a pasted list of numbers into s or σ, with the variance and mean alongside.

Separate numbers with commas, spaces, semicolons or new lines. Don't use thousands separators: write 1000, not 1,000.

Data set

Choose Sample when your numbers are drawn from a larger group; Population when they are the whole group.

Sample standard deviation (s)

5.2372293657of 8 numbers
Variance (s²)
27.4285714286
Mean (x̄)
18
Count (n)
8
Sum (Σx)
144
Sum of squares Σ(x − x̄)²
192
Standard error of the mean
1.8516401995
Coefficient of variation
29.0957%
Minimum / maximum
10 / 23

Formula: s = √(192 ÷ 7) = 5.2372293657

How to use the Standard Deviation Calculator

  1. Type or paste your numbers into the box, separated by commas, spaces, semicolons or new lines.
  2. Choose Sample if the numbers are drawn from a larger group, or Population if they are the entire group you care about.
  3. Read the standard deviation in the result panel; the variance, mean, sum of squares, standard error and coefficient of variation are listed below it.
  4. Check the note under the box: anything that is not a number is listed there and left out of the calculation.

Formula

s = √( Σ(x − x̄)² ÷ (n − 1) ) σ = √( Σ(x − μ)² ÷ N )

Where:

x
Each value in the data set
x̄, μ
The mean: the sum of all values divided by how many there are (x̄ for a sample, μ for a population)
Σ(x − x̄)²
The sum of squares: each value's distance from the mean, squared, then added up
n, N
The number of values (n for a sample, N for a population)
s², σ²
The variance: the sum of squares divided by n − 1 (sample) or N (population)
s, σ
The standard deviation: the square root of the variance, in the same units as the data

Sample mode divides by n − 1 (Bessel's correction), which matches STDEV.S and VAR.S in Excel and Google Sheets; population mode divides by N, matching STDEV.P and VAR.P. Standard error = s ÷ √n. Coefficient of variation = SD ÷ |mean| × 100%. Calculated with 40-digit decimal arithmetic and rounded to 10 decimal places only for display.

Worked example

A food truck sold $120, $135, $150, $110 and $135 on five days picked at random from its season. How much do daily sales typically vary?

  1. Mean: (120 + 135 + 150 + 110 + 135) ÷ 5 = 650 ÷ 5 = $130.
  2. Deviations from the mean: −10, 5, 20, −20 and 5.
  3. Square and add them: 100 + 25 + 400 + 400 + 25 = 950 (the sum of squares).
  4. The five days are a sample of the season, so divide by n − 1 = 4: variance = 950 ÷ 4 = 237.5.
  5. Standard deviation = √237.5 ≈ $15.41. The coefficient of variation is 15.41 ÷ 130 ≈ 11.85%.

The sample standard deviation is about $15.41 a day around a mean of $130. Treated as a whole population instead, the five days give σ = √(950 ÷ 5) = √190 ≈ $13.78.

Sample vs population standard deviation: which one to use

Standard deviation measures spread: roughly, how far a typical value sits from the mean. The single switch on this page decides which version you get, and it is the usual reason two answers disagree.

  • Population (σ, sigma). Your numbers are every member of the group you want to describe, such as the monthly rent of all twelve units in one building. The sum of squares is divided by N.
  • Sample (s). Your numbers are a subset used to learn about something bigger, such as twenty bags weighed from a production run of thousands. The divisor is n − 1, so the result comes out slightly larger.

Most real data is a sample, which is why Sample is the default. One version is shown at a time; flip the switch to see the other for the same list.

The standard deviation formula with n and n − 1

Both versions start the same way: find the mean, subtract it from every value, square the differences and add them up. Only the divisor changes. A sample's values sit closer to their own mean than to the true mean of the population, so squared deviations measured from the sample mean come out slightly too small. Dividing by n − 1 instead of n (Bessel's correction) makes the sample variance an unbiased estimate of the population variance.

The gap matters for small data sets and fades as the count grows. With 5 values the sample figure is about 11.8% larger than the population figure; with 100 values, only about 0.5%.

How to find the standard deviation of a data set

A student measures six bean seedlings after two weeks: 4.2, 5.1, 3.8, 4.9, 5.5 and 4.5 cm. The plants are a sample of what the seed variety does, so the sample formula applies.

StageWorkingResult
Mean28.0 ÷ 64.6667 cm
Deviationseach height minus the mean−0.4667, 0.4333, −0.8667, 0.2333, 0.8333, −0.1667
Squareseach deviation squared0.2178, 0.1878, 0.7511, 0.0544, 0.6944, 0.0278
Sum of squaresadd the squares1.9333
Variance1.9333 ÷ 50.3867 cm²
Standard deviation√0.38670.6218 cm

Treated as the entire population of interest, dividing by 6 instead of 5 gives σ ≈ 0.5676 cm.

The result panel prints only the last line of that working with your numbers in it, s = √(sum of squares ÷ divisor), beside the mean, the sum and the count. It does not list each deviation, so build the table yourself when an assignment asks for every stage.

Variance, standard error and coefficient of variation

  • Variance is the same measure before the square root is taken, so the page doubles as a variance calculator. Its units are squared (cm², dollars squared), which is why the standard deviation is easier to read.
  • Standard error of the mean (s ÷ √n) says how precisely the sample mean estimates the population mean. For the seedlings it is 0.6218 ÷ √6 ≈ 0.2539 cm. It falls as the sample grows, unlike the standard deviation, and feeds into confidence intervals. It appears in Sample mode only, because a full population has no sampling error.
  • Coefficient of variation is the standard deviation as a percentage of the mean: about 13.3% for the seedlings. It compares consistency across different scales, but it is undefined when the mean is zero and misleading when the data can be negative, such as temperatures in Celsius.

Judging the spread in chemistry and quality control

A standard deviation is only large or small relative to its purpose. In a chemistry lab, a small value across replicate titrations shows the method is precise, although not necessarily accurate. In quality control, limits are often drawn three standard deviations either side of the process mean, because for roughly bell-shaped data about 68% of values fall within one standard deviation, about 95% within two and about 99.7% within three.

Squared deviations make the figure sensitive to outliers. One typo, such as 450 instead of 45, can inflate it enormously, so glance at the minimum and maximum in the result list.

Assumptions and limits

  • A plain list only. Every value counts once. There is no frequency table, grouped data or weighting; to enter a value that occurs four times, type it four times.
  • No median, mode or chart. The average calculator covers median and mode.
  • Commas separate entries. 1,250 is read as 1 and 250. Remove thousands separators and check the note under the box for skipped entries.
  • Exact arithmetic. The mean is computed first, then the squared deviations from it, in decimal arithmetic, which avoids the rounding errors of the shortcut formula. Results are rounded to 10 decimal places for display only.

Frequently asked questions

How do I find the standard deviation of a data set?

Find the mean, subtract it from each value, square each difference and add the squares together. Divide that total by n − 1 for a sample (or by N for a whole population) to get the variance, then take the square root. For 2, 4 and 6 the mean is 4, the squared differences are 4, 0 and 4, the sample variance is 8 ÷ 2 = 4 and the standard deviation is 2.

Should I use the sample or the population standard deviation?

Use population when your numbers include every member of the group you are describing, such as the marks of all 28 students in one class. Use sample when your numbers are a subset you are using to estimate something about a larger group, such as 50 customers surveyed out of thousands. If you are unsure, sample is the safer and more common choice. The sample value is written s and the population value σ (sigma).

What is standard deviation in simple terms?

It is a single number that says how spread out a set of values is around their average. A small standard deviation means most values sit close to the mean; a large one means they are scattered widely. It is measured in the same units as the data, so a standard deviation of 3 cm for plant heights means a typical plant is about 3 cm away from the average height.

How do I find the standard deviation from the variance?

Take the square root. Variance is the average squared distance from the mean, so its units are squared (dollars squared, centimeters squared); the square root puts the figure back in the original units, which makes it easier to interpret. A variance of 237.5 gives a standard deviation of √237.5 ≈ 15.41. Going the other way, square the standard deviation to get the variance.

What is a good standard deviation value?

There is no universal good value: it depends on the scale of the data and on what you need. A standard deviation of 5 is large for test scores averaging 10 but small for house prices. The coefficient of variation (standard deviation divided by the mean) helps compare spread across data sets with different units or sizes. For roughly bell-shaped data, about 68% of values fall within one standard deviation of the mean and about 95% within two.

How do I calculate standard deviation in Excel?

Use =STDEV.S(range) for a sample or =STDEV.P(range) for a whole population; VAR.S and VAR.P return the matching variances. Sample mode here matches STDEV.S (and the older STDEV), and Population mode matches STDEV.P. Google Sheets, LibreOffice and most graphing calculators use the same definitions, where s or Sx is the sample value and σ or σx is the population value.

Last updated: