Mean, median, mode and range calculator
A mean median mode calculator finds the three averages of a set of data, plus the range, in one go. The mean is what you get by adding the values and sharing the total equally between them, the median is the middle value once they are in order, and the mode is the value that comes up most often. Type a list of numbers, a frequency table or grouped data, and the calculator gives every one with the working.
It also gives the lower and upper quartiles and the interquartile range, and plots the data with the mean and median marked. It opens on a list of 10 numbers, with a mean of 6.4, a median of 7 and a mode of 7.
Mean, Median and Mode Calculator
Find averages, range and quartiles from raw or grouped data
How to use the mean median mode calculator
- In the Data section, choose Raw data for a list of values, Frequency for a table of values and how often each occurs, or Grouped for classes such as 10 to 20.
- Type the values into the table. Enter moves down and adds a new row. You can also paste a column, or a block of columns, straight from a spreadsheet.
- Read the results: mean, median, mode, range, lower quartile, upper quartile, interquartile range and the number of values.
- Check the working. For a list, it puts the values in order and shows each step. For a frequency or grouped table, it adds a working table with fx and the cumulative frequency.
A list can hold up to 300 values. Under Quartiles you can choose which rule to use, which matters because different textbooks and spreadsheets give slightly different quartiles. For practice, Practice and help sets random questions on the mean, median and range, and on grouped data, with worked solutions.
How to find the mean, median, mode and range
| Measure | What it is | How to find it |
|---|---|---|
| Mean | The usual average | Add all the values, then divide by how many there are |
| Median | The middle value | Put the values in order and find the one at position (n + 1)/2 |
| Mode | The most common value | Find the value that appears most often. There can be more than one, or none |
| Range | How spread out the data is | Take the smallest value from the largest |
In symbols, the mean of n values is:
Example 1: an odd number of values
Find the mean, median, mode and range of 14, 18, 11, 18, 20, 15, 9.
- Order them: 9, 11, 14, 15, 18, 18, 20.
- Mean: the total is 105 and there are 7 values, so the mean is 105 ÷ 7 = 15.
- Median: the middle is at position (7 + 1)/2 = 4, which is 15.
- Mode: 18 appears twice and everything else once, so the mode is 18.
- Range: 20 − 9 = 11.
Type the seven values into Raw data and the calculator gives the same four answers.
Example 2: an even number of values
Find the averages of 6, 2, 9, 4, 12, 7. In order they are 2, 4, 6, 7, 9, 12. With 6 values, the middle position is (6 + 1)/2 = 3.5, so the median sits midway between the third and fourth values:
The mean is 40 ÷ 6 = 6.67 to 2 decimal places, and the range is 12 − 2 = 10. No value appears more than once, so there is no mode. The calculator says "None" rather than 0.
When there are two modes
In 3, 5, 3, 8, 5, 1, both 3 and 5 appear twice. The data has two modes, 3 and 5, and is called bimodal. The calculator lists both. The median here is 4 and the mean is 25 ÷ 6, about 4.17.
Check you have the method:
Mean, median and mode from a frequency table
A frequency table says how many times each value appears. Choose Frequency and type each value x with its frequency f. Here is a survey of how many pets 24 students have:
| Pets, x | Students, f | f × x | Running total of f |
|---|---|---|---|
| 0 | 5 | 0 | 5 |
| 1 | 8 | 8 | 13 |
| 2 | 6 | 12 | 19 |
| 3 | 3 | 9 | 22 |
| 4 | 2 | 8 | 24 |
The mean is 1.54 pets to 2 decimal places. Divide by the total frequency, 24, not by the number of rows. The median is at position (24 + 1)/2 = 12.5, between the 12th and 13th values. The running total passes 12 and 13 in the row for 1, so the median is 1. The mode is the value with the highest frequency, also 1. The range is 4 − 0 = 4.
Grouped data: estimated mean, median and modal class
When data comes in classes, you do not know the exact values, so the calculator gives estimates. Choose Grouped and type each class as From, To and the frequency. Here are the times, in minutes, that 30 people took to finish a puzzle:
| Time (minutes) | Frequency | Midpoint | f × midpoint |
|---|---|---|---|
| 0 to 10 | 4 | 5 | 20 |
| 10 to 20 | 9 | 15 | 135 |
| 20 to 30 | 12 | 25 | 300 |
| 30 to 40 | 5 | 35 | 175 |
- Estimated mean: use each class midpoint as if every value sat there: 630 ÷ 30 = 21 minutes.
- Estimated median: the median is the 15th value (n/2 for grouped data). The running totals are 4, 13, 25 and 30, so it is in the 20 to 30 class, 2 values in out of 12. So it is about 20 + (2 ÷ 12) × 10 = 21.7 minutes.
- Modal class: the class with the most values, 20 to 30. When classes have different widths, the calculator picks the one with the highest frequency density instead.
The range of grouped data can only be estimated too, so the calculator gives the largest possible range: 40 − 0 = 40 minutes. To draw this data as a chart, use the Histogram Maker.
Which average should you use?
Each average answers a slightly different question, so the best one depends on the data.
- Mean: uses every value, so it is best when the data is fairly even. One extreme value pulls it a long way.
- Median: ignores how extreme the ends are, so it is best for skewed data such as house prices or salaries.
- Mode: the only average that works for categories, such as the most popular shoe size or favourite colour.
For example, seven salaries of 32, 35, 36, 38, 41, 44 and 150 thousand dollars have a mean of about 53.7 thousand but a median of 38 thousand. Six of the seven people earn less than the mean, so the median describes a typical salary far better.
Quartiles and the interquartile range
The quartiles split ordered data into four equal parts: the lower quartile Q1 is a quarter of the way through, the median is halfway, and the upper quartile Q3 is three quarters of the way. The interquartile range, Q3 − Q1, measures the spread of the middle half and is not affected by extreme values.
There is more than one rule for quartiles, which is why different calculators can disagree. This one lets you pick:
| Rule in the calculator | How it works | Q1 and Q3 for 9, 11, 14, 15, 18, 18, 20 |
|---|---|---|
| Median of each half | The median of the lower half and of the upper half, leaving out the middle value when n is odd | 11 and 18 |
| Position (n + 1)/4 | Q1 at position (n + 1)/4, interpolating between values. Excel calls this QUARTILE.EXC | 11 and 18 |
| Position (n − 1)/4 + 1 | Q1 at position (n − 1)/4 + 1, interpolating. Excel calls this QUARTILE.INC, and it is the default in R | 12.5 and 18 |
Use the rule your course uses. Most school courses use the median of each half. To draw the quartiles as a box plot, use the Box Plot Calculator.
Common mistakes
- Not ordering the data first. The median is the middle of the ordered list, not of the list as written.
- Using n/2 for the median of a list. For raw data the middle is at (n + 1)/2. For 7 values that is the 4th.
- Taking the middle value of an even list. With an even number of values, average the two middle ones.
- Giving the frequency as the mode. The mode is the value that appears most, not how many times it appears.
- Dividing by the number of rows. In a frequency table, divide Σfx by the total frequency Σf.
- Saying the mode is 0 when nothing repeats. If no value is more common than the others, there is no mode.
Practise averages in a short timed paper
Averages and spread come up in Pre-Algebra & Algebra 1 and AP Statistics practice, and in GCSE Maths Foundation in the UK. Each daily paper is a short timed paper of 8 questions worth 25 to 35 marks, and the papers mix topics. For the spread of data around the mean, use the Standard Deviation Calculator.
Common questions
How do you find the median of an even set of numbers?
Can there be more than one mode?
What is the range in maths?
How do you find the mean from a frequency table?
Why is the mean from grouped data only an estimate?
Why do calculators give different quartiles?
Revision cards
Say the answer first, then flip the card to check it.
Where to go next
- Solve it
Mean, Median and Mode Calculator
Find averages, range and quartiles from raw or grouped data
Open the tool - Test it
Pre-Algebra & Algebra 1
A new exam-style paper every day, with instant marking and a mark scheme
Start today's paper - Test it
AP Statistics
A new exam-style paper every day, with instant marking and a mark scheme
Start today's paper