Standard Deviation and Statistics Calculator

A free statistics calculator that turns a list of numbers into the mean, median, mode, variance, standard deviation, quartiles and more.

Separate numbers with commas, spaces, semicolons, tabs or new lines. You can paste a column straight from a spreadsheet. Use a dot for decimals (1.5) and e for powers of ten (1.5e3).

Sorted data

  1. 2
  2. 4
  3. 4
  4. 4
  5. 5
  6. 5
  7. 7
  8. 9

Results

Mean 5 (n = 8)
Results
Center
Count (n)8
Sum (Σx)40
Mean (x̄)5
Median4.5
Mode4appears 3 times
Geometric mean4.60321559605
Range and quartiles
Minimum2
Maximum9
Range7
First quartile (Q1)4
Third quartile (Q3)5.5
Interquartile range (IQR)1.5
Spread
Population standard deviation (σ)2
Population variance (σ²)4
Sample standard deviation (s)2.1380899353
Sample variance (s²)4.57142857143
Sum of squares Σ(x − x̄)²32

How to use

  • Type or paste numbers separated by commas, spaces, semicolons, tabs or new lines. The results update as you type.
  • You can copy a column or a row from Excel or Google Sheets and paste it directly. There is no limit on how many values you enter.
  • Negative numbers (−3), decimals (2.5) and scientific notation (1.5e3 = 1500) are accepted. If an entry is not a number, the calculator points out the first one.
  • Results are grouped into center, range and quartiles, and spread, and the data is shown sorted in ascending order below the input.
  • Your numbers are processed only in your browser and are never stored or sent anywhere.

Formulas

  • Mean x̄ = Σx ÷ n (the sum of the values divided by how many there are)
  • Median: the middle value of the sorted data, or the average of the two middle values when n is even
  • Mode: the most frequent value. If several values tie, all of them are shown; if every value appears once, there is no mode.
  • Population variance σ² = Σ(x − x̄)² ÷ n, population standard deviation σ = √σ²
  • Sample variance s² = Σ(x − x̄)² ÷ (n − 1), sample standard deviation s = √s²
  • Quartiles: the value at position 1 + (n − 1) × p in the sorted data (p = 0.25 for Q1, 0.75 for Q3), interpolating linearly between neighbors, the same as Excel QUARTILE.INC. IQR = Q3 − Q1
  • Geometric mean = n-th root of (x₁ × x₂ × … × xₙ)

Step by step: standard deviation of 70, 80, 90, 85, 75

  • Step 1, mean: the sum is 400, and 400 ÷ 5 = 80
  • Step 2, deviations: subtract the mean from each value to get −10, 0, 10, 5, −5
  • Step 3, sum of squared deviations: 100 + 0 + 100 + 25 + 25 = 250
  • Step 4, variance: population 250 ÷ 5 = 50, sample 250 ÷ 4 = 62.5
  • Step 5, standard deviation: population √50 ≈ 7.071, sample √62.5 ≈ 7.906
  • Sorted, the data is 70, 75, 80, 85, 90, so the median is 80, Q1 is the 2nd value (75), Q3 is the 4th value (85) and the IQR is 10. Every value appears once, so there is no mode.

Population vs sample standard deviation

The population standard deviation divides the sum of squared deviations by n; the sample standard deviation divides it by n − 1. Use the population version when you have data for the entire group you care about, such as every student in one class, and the sample version when your data is a subset of a larger group, such as survey respondents.

A sample measures deviations from its own mean rather than the true population mean, so dividing by n tends to underestimate the variance. Dividing by n − 1 (Bessel’s correction) fixes this, which is why the sample value comes out a little larger. For the preloaded data 2, 4, 4, 4, 5, 5, 7, 9, the population standard deviation is 2 and the sample standard deviation is about 2.138.

In Excel, the population and sample standard deviations are STDEV.P and STDEV.S, and the variances are VAR.P and VAR.S.

Good to know

  • There are several ways to calculate quartiles. For 2, 4, 4, 4, 5, 5, 7, 9, Q3 is 5.5 here (the QUARTILE.INC method), 6.5 with QUARTILE.EXC, and 6 if you take the median of the upper half.
  • To spot outliers, look for values below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR. For the preloaded data the fences are 1.75 and 7.75, so 9 counts as an outlier by this rule.
  • Variance is in squared units (cm²), while the standard deviation is in the original units (cm), so it reads as the typical distance from the mean.
  • With a single value, the population variance and standard deviation are 0 and the sample versions show “—”. The geometric mean is calculated only when every value is greater than 0.
  • Results are shown with up to 12 significant digits.

Frequently asked questions

How do you calculate standard deviation?

Find the mean, square each value’s distance from the mean, add the squares, divide by n (population) or n − 1 (sample), and take the square root. For 70, 75, 80, 85, 90 the squares add up to 250, so the population standard deviation is √(250 ÷ 5) = √50 ≈ 7.071.

Should I use the sample or the population standard deviation?

Use the population standard deviation (÷n) when your data covers the whole group you care about, and the sample standard deviation (÷(n − 1)) when it is a sample from a larger group. In Excel these are STDEV.P and STDEV.S.

Why does sample variance divide by n − 1?

Dividing by n − 1 corrects the tendency of a sample to underestimate the population variance, because deviations are measured from the sample mean. This is called Bessel’s correction, and it is why the sample variance needs at least 2 values.

What is the difference between variance and standard deviation?

The standard deviation is the square root of the variance. Variance is in squared units, while the standard deviation uses the same units as your data, so it shows how far values typically fall from the mean.

Why are my quartiles different from another calculator or textbook?

Quartiles differ because there are several calculation methods. This calculator uses linear interpolation, the same as Excel QUARTILE.INC, so for 2, 4, 4, 4, 5, 5, 7, 9 it gives Q3 = 5.5, while QUARTILE.EXC gives 6.5.

Why does the mode say “None” or list several values?

If every value appears only once, there is no mode. If several values tie for the highest frequency, all of them are listed in ascending order along with how many times they appear.

Why is the geometric mean shown as “—”?

The geometric mean is not calculated when any value is zero or negative. It multiplies all values and takes the n-th root, which is only meaningful when every value is greater than 0.