Mean, median and mode calculator with range and standard deviation

Paste or type a list of numbers to get the mean, median and mode at once, together with the range, quartiles, variance and both kinds of standard deviation.

Live demo · real result from this tool
Mean16.57142857
Median
15
Mode
8 (×2)
Count
7
Sum
116
Minimum
4
Maximum
42
Range
38
Standard deviation (population σ)
11.92664655
Standard deviation (sample s)
12.88225062
Variance (population σ²)
142.244898
Variance (sample s²)
165.952381
Q1 / Q3 (Tukey hinges)
8 / 23
Interquartile range
15
Geometric mean
12.89703154
Harmonic mean
10.05090855

Sorted

4, 8, 8, 15, 16, 23, 42

Frequency

ValueCount
41
82
151
161
231
421

Use the sample standard deviation when your numbers are a sample from a larger group; use the population value when they are the whole group.

Processed on your device — nothing is uploaded.

How to use the mean, median and mode calculator

  1. Paste your numbers into Numbers (separated by commas, spaces or new lines). A column copied from a spreadsheet works.
  2. Read Mean, Median and Mode at the top.
  3. Look further down for the count, sum, minimum, maximum, range, standard deviations, variances, quartiles and interquartile range.
  4. Use the Sorted list and the Frequency table to check the median and mode by eye.

What it does and when to use it

The mean, median and mode are three ways to describe a typical value. The mean is the ordinary average. The median is the middle value and is not pulled about by one very large or small number. The mode is the most common value and is the only one that works for categories such as shoe sizes.

Students use this for statistics homework and coursework data; teachers use it to summarise marks. When all values are positive, the tool also gives the geometric and harmonic means. To see how far one value lies from the mean in standard deviations, take the results to the z-score calculator. For the percent error of an averaged lab result, average first and then compare.

How it works

  • Mean = sum of values ÷ count. The sum uses a compensated method so that 0.1 + 0.2 + 0.3 comes out as exactly 0.6.
  • Median: sort the values; take the middle one, or the average of the two middle ones.
  • Mode: count each value; report those with the highest count, if it is more than 1.
  • Range = maximum − minimum.
  • Variance: σ² = Σ(x − mean)² ÷ n for a population, s² = Σ(x − mean)² ÷ (n − 1) for a sample. The standard deviation is the square root.
  • Q1 and Q3: medians of the lower and upper halves.

Step by step for 4, 8, 15, 16, 23, 42, 8:

  1. Sort: 4, 8, 8, 15, 16, 23, 42. There are 7 values.
  2. Mean: 116 ÷ 7 = 16.571428…
  3. Median: the 4th value of 7, which is 15.
  4. Mode: 8 appears twice, every other value once, so the mode is 8.
  5. Range: 42 − 4 = 38.
  6. Quartiles: lower half 4, 8, 8 gives Q1 = 8; upper half 16, 23, 42 gives Q3 = 23.

The tool matches: Mean: 16.57142857, Median: 15, Mode: 8 (×2), range 38, Q1 / Q3 = 8 / 23.

Worked examples

Default list. As above. The single large value 42 pulls the mean (16.57) above the median (15).

Textbook standard deviation. 2 4 4 4 5 5 7 9 has mean 5, median 4.5 and mode 4. The tool shows Standard deviation (population σ): 2 and a sample s of 2.138089935.

No repeats. 3, 7, 1, 9 gives mean 5, median 5 and Mode: none (no value repeats).

Two modes. 1 1 2 2 3 gives Mode: 1, 2 (×2) and mean 1.8.

Limits and tips

  • Results are shown to 10 significant figures. Round them for a report with the rounding calculator.
  • The frequency table appears when there are 100 distinct values or fewer.
  • Your data is processed in the browser and not uploaded.

Frequently asked questions

What if two values appear equally often?
The tool lists every mode. For 1, 1, 2, 2, 3 it shows "1, 2 (×2)", meaning both 1 and 2 appear twice. If no value repeats, it says there is no mode.
How is the median found for an even number of values?
The list is sorted and the two middle values are averaged. For 1, 3, 7, 9 the middle values are 3 and 7, so the median is 5.
Should I use the sample or the population standard deviation?
Use the population value (σ, divide by n) when your list is the whole group, such as every test score in your class. Use the sample value (s, divide by n − 1) when the list is a sample taken from a bigger group.
How are the quartiles worked out?
With Tukey's hinges. Q1 is the median of the lower half and Q3 the median of the upper half; for an odd count the middle value is left out of both halves. Other methods, such as the one in Excel, can give slightly different quartiles.
What happens to text in my list?
Anything that is not a number, such as a word or a unit, is skipped. The tool tells you how many items it ignored and shows the first few.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close