Mean, median and mode calculator
Paste your numbers, or values and frequencies from a table. You get every average and measure of spread, how each was found, and a box plot.
- n
- 10
- Mean
- 7.00
- Median
- 7.50
- Mode
- 9
- Range
- 7.00
- Q1
- 5.00
- Q3
- 9.00
- IQR
- 4.00
Show the working
n = 10, Σx = 70.0, Σx² = 542
Mean x̄ = Σx ÷ n = 70.0 ÷ 10 = 7.00
Median: put the 10 values in order; the median is halfway between values 5 and 6: 7.50.
Mode: 9 (3 times).
Range = 10 − 3 = 7.00
Quartiles: Q1 = 5.00 and Q3 = 9.00 (the medians of the lower and upper halves), so IQR = 9.00 − 5.00 = 4.00.
Textbooks use slightly different rules for quartiles; this is the one graphic calculators use. For a large data set or a cumulative frequency graph, the exam may use (n + 1)/4 or n/4: follow your course.
Answers are rounded to 3 significant figures. Give your answer to the accuracy the question asks for.
How to do it by hand
- Mean: add the values and divide by how many there are. From a frequency table, multiply each value by its frequency, add the results (Σfx) and divide by the total frequency (Σf).
- Median: the middle value once the data are in order, the ((n + 1) ÷ 2)th. In a frequency table, add up the frequencies until you pass that position.
- Mode: the most common value; in a frequency table, the value with the highest frequency. Range: the largest value minus the smallest.
- Grouped data: the exact values are unknown, so use each class midpoint as x. Σfx ÷ Σf is then an estimate of the mean, and the class with the highest frequency is the modal class. Type the midpoints into the tool as the values.
Worked example
The table shows the number of goals scored in 20 football matches. 0 goals: 3 matches, 1 goal: 6, 2 goals: 5, 3 goals: 4, 4 goals: 2. Find the mean, median and mode.
Solution
n = 20, Σx = 36.0, Σx² = 94.0
With a frequency table, Σx means Σfx (each value times its frequency) and n = Σf.
Mean x̄ = Σx ÷ n = 36.0 ÷ 20 = 1.80
Median: put the 20 values in order; the median is halfway between values 10 and 11: 2.00.
Mode: 1 (6 times).
Range = 4 − 0 = 4.00
Quartiles: Q1 = 1.00 and Q3 = 3.00 (the medians of the lower and upper halves), so IQR = 3.00 − 1.00 = 2.00.
Textbooks use slightly different rules for quartiles; this is the one graphic calculators use. For a large data set or a cumulative frequency graph, the exam may use (n + 1)/4 or n/4: follow your course.
Answer: Mean 1.80, median 2.00, mode 1
Every number in this example is worked out by the same code as the tool above, and the code is tested against independent results from Python's SciPy library.
Where you need it
| Edexcel 4MA1 | 6.2 Statistical measures: Foundation and Higher. Higher adds medians and quartiles from cumulative frequency, interquartile range. |
|---|---|
| Cambridge 0580 | C9.3 / E9.3 Averages and measures of spread: Core: mean, median, mode and range of individual data and of data in a list or frequency table (not grouped); choosing the right average. Extended adds: quartiles and interquartile range of individual data; estimated mean and modal class of grouped data. |
Calculator: 4MA1: A calculator may be used in all four papers. 0580: No calculator on Papers 1 and 2; a scientific calculator is needed for Papers 3 and 4. Algebraic or graphic calculators are not allowed.
Mean from a frequency table (including grouped data with midpoints), median and quartiles. The statistics mode does the Σfx ÷ Σf for you; the exam still wants to see the method.
Practise it: IGCSE units (Unit 6: Statistics).
On your calculator
In the exam you use your own calculator, so practise it too. Our guides give the exact keystrokes for the Casio fx-991EX ClassWiz, Casio fx-991CW ClassWiz, Casio fx-CG50, TI-84 Plus CE and TI-Nspire CX II, with a worked example to check against:
Common mistakes
- Dividing by the number of rows. The mean is Σfx ÷ Σf = 36 ÷ 20, not a total divided by 5.
- Giving the mode as 6, the highest frequency, instead of 1 goal, the value that has that frequency.
- Taking the middle row of the table as the median. The median is the mean of the 10th and 11th of the 20 matches, which are both 2 goals.
- For grouped data, multiplying by the upper class boundary instead of the midpoint, or not saying that the mean is an estimate.
Notes and practice
Questions students ask
Are quartiles and the interquartile range on IGCSE Foundation or Core?
Not on Cambridge 0580 Core: quartiles and the interquartile range are in the Extended statement of sub-topic 9.3. On Edexcel 4MA1, section 6.2 adds medians and quartiles from cumulative frequency and the interquartile range at Higher tier.
Why is the mean of grouped data only an estimate?
Inside each class you do not know the actual values, so each one is treated as the class midpoint. The answer is close to the true mean but not exact, so call it an estimate in your answer.
Can I use a calculator to find the mean in IGCSE?
On Edexcel 4MA1, yes: a calculator may be used in all four papers, and its statistics mode does Σfx ÷ Σf for you. Cambridge 0580 Papers 1 and 2 are non-calculator, so practise a frequency table by hand with an extra fx column; Papers 3 and 4 allow a scientific calculator.
Do I need box plots for Cambridge 0580?
No. Our map of the 0580 syllabus records that box-and-whisker plots were removed in 2025 (sub-topic 9.4). The tool still draws one, as a picture of the quartiles.