Advertisement
Namecheap VPS hosting

Mean, median and mode calculator

Find the mean, median, mode and range of a set of numbers, with the working shown. Paste a list of numbers to also get the quartiles, standard deviation and variance. Or switch to grouped data and enter class intervals with frequencies: the calculator uses the same formulas as the Class 10 statistics chapter, and shows the table of mid-points, fx and cumulative frequency.

Type of data
Separate with commas, spaces or new lines. You can paste a column from Excel.
–Mean (average)
–Median (middle)
–Mode (most common)
–Range

Working

Advertisement
Namecheap VPS hosting

How to use the mean, median and mode calculator

  1. Choose a list of numbers or grouped data.
  2. Paste your numbers, separated by commas, spaces or new lines. For grouped data, type one class per line, like 10-20, 8.
  3. Read the mean, median, mode and range at the top.
  4. Follow the working to see how each one is found.

How it works

For a list of numbers:

  • Mean = sum of the numbers ÷ how many there are.
  • Median = the middle number once they're sorted. With an even count, it's the average of the two middle numbers.
  • Mode = the number that appears most often. There can be more than one mode, or none if every number appears once.
  • Range = largest − smallest.

The quartiles use the median of the lower half and of the upper half. The population standard deviation divides by n; the sample one divides by n − 1, which is used when your numbers are a sample from a bigger group.

For grouped data:

Mean = Σfx ÷ N, where x is the mid-point of each class

Median = l + ((N/2 − cf) ÷ f) × h

Mode = l + ((f₁ − f₀) ÷ (2f₁ − f₀ − f₂)) × h

  • l is the lower limit of the median class (or modal class), and h is the class width.
  • For the median: cf is the cumulative frequency before the median class and f is its frequency.
  • For the mode: f₁ is the frequency of the modal class, and f₀ and f₂ are the frequencies of the classes before and after it.

Inclusive classes such as 10–19, 20–29 are made continuous first (9.5–19.5, 19.5–29.5).

Example

List: 4, 8, 6, 5, 3, 8, 9, 5, 8

  • Sorted: 3, 4, 5, 5, 6, 8, 8, 8, 9
  • Mean = 56 ÷ 9 = 6.2222
  • Median = the 5th number = 6
  • Mode = 8 (appears 3 times)
  • Range = 9 − 3 = 6

Grouped data:

Class0–1010–2020–3030–4040–50
Frequency5820157
  • Mean = 1,485 ÷ 55 = 27
  • Median = 20 + ((27.5 − 13) ÷ 20) × 10 = 27.25
  • Mode = 20 + ((20 − 8) ÷ (40 − 8 − 15)) × 10 = 27.0588

Frequently asked questions

What is the difference between mean, median and mode?

The mean is the ordinary average: add them up and divide by how many. The median is the middle value once sorted. The mode is the value that appears most often.

How do I find the median of an even number of values?

Sort them and take the average of the two middle values. For 2, 4, 7, 9 the median is (4 + 7) ÷ 2 = 5.5.

Can there be more than one mode?

Yes. If two or more values are tied for most common, they are all modes. If every value appears once, there is no mode.

What is the relation between mean, median and mode?

For moderately skewed data, the empirical relation is mode ≈ 3 × median − 2 × mean. The calculator shows this check for grouped data.

Last updated: 29 October 2026