Statistics Calculator

Summarize the center, spread and shape of a data set, with the mean, variance, SD and quartiles worked out from your own numbers, plus outliers and a histogram.

Type your numbers with commas, spaces or new lines between them. Up to 10,000 numbers, each within ±10⁵⁰. Every entry must be a number.

Treat data as

Quartiles split the sorted list into four equal parts. The methods only differ when a quartile falls between two numbers; the median is the same.

Mean

26.3

n = 20 · SD 3.628832 · median 26

  • Count · Sum20 · 526
  • Mean (average) · Median (middle) · Mode (most common)26.3 · 26 · 25
  • Geometric mean · RMS26.06134 · 26.53677
  • Min · Max · Range20 · 33 · 13
  • Five-number summary (min · Q1 · median · Q3 · max)20 · 23.75 · 26 · 29 · 33
  • Q1 · Q3 · IQR (spread of the middle half)23.75 · 29 · 5.25
  • Variance (sample)13.168421
  • Standard deviation (sample; how spread out)3.628832
  • Standard error of the mean0.811431
  • Coefficient of variation13.798%
  • Skewness · Excess kurtosis0.1314 · -0.8143
  • Outliers (1.5 × IQR rule)none

How this was calculated

  1. First, put the numbers in order from smallest to largest. The median and quartiles are read from this sorted list.SortedAnswer: 20, 21, 22, 23, 23, 24, 25, 25, 25, 26, 26, 27, 27, 28, 29, 29, 30, 31, 32, 33
  2. The mean (average) shares the total out evenly. Add up all the numbers (Σ means “add them all up”), then divide by how many numbers there are (n).Mean = Σx ÷ nPut in your numbers: (23 + 29 + 20 + 32 + 23 + 21 + 33 + 25 + … + 25 + 27) ÷ 20 = 526 ÷ 20Answer: 26.3
  3. For each number, find how far it is from the mean, then multiply that distance by itself (square it) so every distance is positive. Add them all up.Sum of squared deviations Σ(x − mean)²Put in your numbers: (23 − 26.3)² + (29 − 26.3)² + (20 − 26.3)² + (32 − 26.3)² + (23 − 26.3)² + (21 − 26.3)² + (33 − 26.3)² + (25 − 26.3)² + … + (25 − 26.3)² + (27 − 26.3)² = 10.89 + 7.29 + 39.69 + 32.49 + 10.89 + 28.09 + 44.89 + 1.69 + … + 1.69 + 0.49Answer: 250.2
  4. The variance is the average squared distance from the mean. For a sample (a small part of a bigger group), divide by one less than the count (n − 1).Variance (sample) = Σ(x − mean)² ÷ (n − 1)Put in your numbers: 250.2 ÷ (20 − 1)Answer: 13.168421
  5. Take the square root of the variance. This is the standard deviation (how spread out the numbers are), in the same units as your data.Standard deviation = √variancePut in your numbers: √13.168421Answer: 3.628832
  6. The standard error shows how much the mean could change if you took a new sample. Divide the standard deviation by the square root of the count.Standard error of the mean = SD ÷ √nPut in your numbers: 3.628832 ÷ √20Answer: 0.811431
  7. Q1 (the first quartile) is one quarter of the way up the sorted list. First find its place (position). If the place falls between two numbers, go that part of the way from one to the next.Q1: position h = (n − 1) × 0.25 + 1, then interpolate between neighboursPut in your numbers: h = (20 − 1) × 0.25 + 1 = 5.75; Q1 = x₅ + 0.75 × (x₆ − x₅) = 23 + 0.75 × (24 − 23)Answer: 23.75
  8. The median is the middle of the sorted list: half the numbers are below it and half are above. First find its place (position) in the list.Median: position h = (n − 1) × 0.5 + 1, then interpolate between neighboursPut in your numbers: h = (20 − 1) × 0.5 + 1 = 10.5; Median = x₁₀ + 0.5 × (x₁₁ − x₁₀) = 26 + 0.5 × (26 − 26)Answer: 26
  9. Q3 (the third quartile) is three quarters of the way up the sorted list. First find its place (position). If the place falls between two numbers, go that part of the way from one to the next.Q3: position h = (n − 1) × 0.75 + 1, then interpolate between neighboursPut in your numbers: h = (20 − 1) × 0.75 + 1 = 15.25; Q3 = x₁₅ + 0.25 × (x₁₆ − x₁₅) = 29 + 0.25 × (29 − 29)Answer: 29
  10. The interquartile range (IQR) is the spread of the middle half of the numbers: Q3 minus Q1.IQR = Q3 − Q1Put in your numbers: 29 − 23.75Answer: 5.25
  11. Build two fences, 1.5 IQRs below Q1 and 1.5 IQRs above Q3. Any number outside the fences is an outlier (unusually far from the rest).Outlier fences: Q1 − 1.5 × IQR and Q3 + 1.5 × IQRPut in your numbers: 23.75 − 1.5 × 5.25 = 15.875; 29 + 1.5 × 5.25 = 36.875Answer: no outliers
  12. In short: the variance is Σ(x − mean)² ÷ (n − 1), because this is a sample. The standard deviation (SD) is √variance, and the standard error (SEM) is SD ÷ √n.
  13. The quartiles use linear interpolation (type 7, the method of Excel QUARTILE.INC and R's default). The outlier fences are Q1 − 1.5·IQR = 15.875 and Q3 + 1.5·IQR = 36.875; any number outside them is an outlier.

Box plot

Box plot: minimum 20, Q1 23.75, median 26, Q3 29, maximum 33, no outliers2022.625.227.830.433
Five-number summary
MinimumQ1MedianQ3MaximumOutliers
2023.75262933none
012345620–22.622.6–25.225.2–27.827.8–30.430.4–33
  • Count

 

Statistics in simple words

Statistics are short summaries of a list of numbers. Instead of reading every number, you can look at a few that tell the story: the middle, the spread and anything unusual.

The mean (average) and the median (middle number) show where the list is centred. The standard deviation shows how spread out it is. Quartiles cut the sorted list into four equal parts, and the gap between the first and third quartile (the IQR) is the spread of the middle half.

Example: for 2, 4, 4, 4, 5, 5, 7, 9, the total is 40 and there are 8 numbers, so the mean is 40 ÷ 8 = 5. The median is halfway between the 4th and 5th numbers, 4 and 5, which is 4.5.

An outlier is a number much bigger or smaller than the rest. This calculator flags any number more than 1.5 IQRs outside the middle half.

Sample and population spread

Variance averages squared deviations from the mean. Population variance divides their sum by n; sample variance divides by n − 1. Standard deviation is the square root of variance and uses the original measurement units.

Choose population when the data is the whole group you want to describe. Choose sample when it is used to estimate a larger group. The displayed standard error is the selected standard deviation divided by √n; interpreting it as uncertainty in a mean also needs appropriate sampling assumptions.

Example: 2, 4, 4, 4, 5, 5, 7, 9

The mean is 5, median 4.5 and mode 4. Squared deviations sum to 32. Population variance is 32 ÷ 8 = 4 and population standard deviation is 2. Sample variance is 32 ÷ 7 ≈ 4.571429 and sample standard deviation is about 2.13809.

Using type-7 linear interpolation, Q1 = 4 and Q3 = 5.5, so IQR = 1.5. The 1.5 × IQR fences are 1.75 and 7.75. The value 9 is flagged; a flag calls for investigation, not automatic deletion.

Quartiles, shape and limits

Quartiles interpolate at positions (n − 1)p in the sorted data, counting positions from zero. Other quartile conventions can give different answers for small data sets. Skewness and excess kurtosis use population central moments; they are undefined when there is no spread.

The geometric mean is shown only when all observations are positive. A coefficient of variation is meaningful for a ratio scale with a meaningful zero; avoid interpreting it for negative means or arbitrary origins such as Celsius temperature.

Enter 2–10,000 valid observations, each within ±10⁵⁰. Commas separate observations rather than thousands. Invalid tokens are rejected. Histogram bins are a visual summary and do not change the underlying statistics.

Five-number summary, quartile methods and the box plot

The five-number summary is the minimum, Q1, median, Q3 and maximum. The box plot draws the box from Q1 to Q3 with a line at the median; whiskers run to the most extreme values inside the 1.5 × IQR fences, and anything beyond them is drawn as a separate outlier point.

Choose how quartiles are located. Inclusive (type 7, the default) uses position h = (n − 1)p + 1. Exclusive (type 6, the NIST and Minitab rule) uses h = (n + 1)p. Tukey hinges take the median of the lower and upper halves, including the median in both halves when n is odd. A fractional position is interpolated between its neighbours: h = 2.75 means x₂ + 0.75 × (x₃ − x₂).

For 7, 15, 36, 39, 40, 41 (n = 6): type 7 gives Q1 = 15 + 0.25 × 21 = 20.25 and Q3 = 39 + 0.75 × 1 = 39.75; type 6 gives Q1 = 7 + 0.75 × 8 = 13 and Q3 = 40 + 0.25 × 1 = 40.25; Tukey hinges give Q1 = 15 and Q3 = 40. The median is 37.5 under all three.

Frequently asked questions

How are the mean and standard deviation worked out?

The mean is the sum divided by the count; for 2, 4, 4, 4, 5, 5, 7, 9 that is 40 ÷ 8 = 5. The squared deviations from the mean sum to 32, so the population variance is 32 ÷ 8 = 4 and the standard deviation is √4 = 2. The working panel shows these lines with your own data.

Why do my quartiles differ from a spreadsheet?

Programs offer several quantile conventions. This calculator defaults to type-7 linear interpolation with inclusive endpoints (Excel QUARTILE.INC, R's default); switch the quartile method to exclusive (QUARTILE.EXC) or Tukey hinges to match another tool. Compare the method as well as the data.

Is an outlier necessarily an error?

No. The 1.5 × IQR rule flags unusual observations. A value may be valid and important; check measurement quality and context before excluding it.

References

Last updated . Results are estimates for informational purposes only.