Uni-Sine
MathematicsStatistics

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.

Try it

Mean, Median and Mode Calculator

Find averages, range and quartiles from raw or grouped data

Go to its page

How to use the mean median mode calculator

  1. 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.
  2. 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.
  3. Read the results: mean, median, mode, range, lower quartile, upper quartile, interquartile range and the number of values.
  4. 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

MeasureWhat it isHow to find it
MeanThe usual averageAdd all the values, then divide by how many there are
MedianThe middle valuePut the values in order and find the one at position (n + 1)/2
ModeThe most common valueFind the value that appears most often. There can be more than one, or none
RangeHow spread out the data isTake the smallest value from the largest

In symbols, the mean of n values is:

\bar{x} = \frac{\Sigma x}{n}Σx is the total of the values and n is how many there are

Example 1: an odd number of values

Find the mean, median, mode and range of 14, 18, 11, 18, 20, 15, 9.

  1. Order them: 9, 11, 14, 15, 18, 18, 20.
  2. Mean: the total is 105 and there are 7 values, so the mean is 105 ÷ 7 = 15.
  3. Median: the middle is at position (7 + 1)/2 = 4, which is 15.
  4. Mode: 18 appears twice and everything else once, so the mode is 18.
  5. 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:

\text{median} = \frac{6 + 7}{2} = 6.5

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:

practice
Pick an answer, then check it.
What is the median of 8, 3, 10, 5, 3, 12?

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, xStudents, ff × xRunning total of f
0505
18813
261219
33922
42824
\bar{x} = \frac{\Sigma fx}{\Sigma f} = \frac{37}{24} = 1.54

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)FrequencyMidpointf × midpoint
0 to 104520
10 to 20915135
20 to 301225300
30 to 40535175
  • 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 calculatorHow it worksQ1 and Q3 for 9, 11, 14, 15, 18, 18, 20
Median of each halfThe median of the lower half and of the upper half, leaving out the middle value when n is odd11 and 18
Position (n + 1)/4Q1 at position (n + 1)/4, interpolating between values. Excel calls this QUARTILE.EXC11 and 18
Position (n − 1)/4 + 1Q1 at position (n − 1)/4 + 1, interpolating. Excel calls this QUARTILE.INC, and it is the default in R12.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?
Put the numbers in order and find the two in the middle. The median is halfway between them: add them and divide by 2. For 2, 4, 6, 7, 9, 12 the median is (6 + 7) ÷ 2 = 6.5.
Can there be more than one mode?
Yes. If two values share the highest frequency, both are modes and the data is bimodal. If every value appears the same number of times, there is no mode.
What is the range in maths?
The largest value minus the smallest. It shows how spread out the data is, but one extreme value can make it misleading, which is why the interquartile range is also used.
How do you find the mean from a frequency table?
Multiply each value by its frequency, add those products to get Σfx, then divide by the total frequency Σf.
Why is the mean from grouped data only an estimate?
Grouped data does not show the actual values, only which class each falls in. Using the midpoint of each class assumes the values balance out around it, which is close but not exact.
Why do calculators give different quartiles?
There are several accepted rules for quartiles, and they give slightly different answers for small sets of data. This calculator states the rule it is using and lets you switch to the one your course or spreadsheet uses.

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
Read next
Maths · StatisticsP-value calculator: z, t and chi-square testsFree p-value calculator: run a z, t, chi-square or F test from your data or summary values and get the p-value, the critical value and a plain conclusion.