Mean, median, mode: free calculator with the working shown step by step

Short answer: the mean is the total divided by how many values there are. The median is the middle value once the numbers are in order. The mode is the value that appears most often. The range is the largest value minus the smallest. Paste your numbers into the calculator below to get all four, with the working shown.

Last updated: November 2026.

Mean, median, mode and range calculator

Type or paste numbers separated by commas, spaces or new lines. Negative numbers and decimals work. Nothing is sent anywhere: the maths runs in your browser.

How to find each one

MeasureWhat it tells youHow to work it out
MeanThe “fair share” averageAdd all values, divide by how many there are (n)
MedianThe middle of the dataSort the values. The median sits at position (n + 1) ÷ 2
ModeThe most common valueCount how often each value appears. Two modes = bimodal
RangeHow spread out the data isLargest value minus smallest value
Source: OpenStax, Introductory Statistics 2e, section 2.5. Range: standard definition.

The mean, median and mode are all “averages”, or measures of centre. The range is not an average. It measures spread. For a fuller measure of spread, see variance.

Worked example: an odd number of values

Data: 3, 7, 7, 2, 9, 4, 10. Sorted: 2, 3, 4, 7, 7, 9, 10. There are 7 values.

StepWorkingAnswer
Mean(2 + 3 + 4 + 7 + 7 + 9 + 10) ÷ 7 = 42 ÷ 76
MedianPosition (7 + 1) ÷ 2 = 4th value7
Mode7 appears twice; every other value once7
Range10 − 28
Calculated by My Web Stats.

Worked example: an even number of values

Data: 4, 8, 15, 16, 23, 42. There are 6 values, already in order.

  • Mean: 108 ÷ 6 = 18.
  • Median: position (6 + 1) ÷ 2 = 3.5, so take the average of the 3rd and 4th values: (15 + 16) ÷ 2 = 15.5.
  • Mode: every value appears once, so there is no mode.
  • Range: 42 − 4 = 38.

Note that 3.5 is the position of the median, not its value. Mixing the two up is a common exam slip.

Mean or median? When outliers mislead

Imagine a small town of 50 people. 49 earn £30,000 a year and one earns £5,000,000. The numbers follow a classic OpenStax textbook example (there in dollars; the maths is identical in pounds).

AverageValueDoes it describe a typical person?
Mean pay£129,400No: nobody in the town earns this
Median pay£30,000Yes
Mode pay£30,000Yes
Source: OpenStax, Introductory Statistics 2e, Example 2.27. Calculated by My Web Stats: (49 × £30,000 + £5,000,000) ÷ 50 = £129,400.

One extreme value (an outlier) drags the mean far above what most people earn. The median ignores how extreme the outlier is, which is why OpenStax calls it the better measure of centre when the data has outliers. That is also why salary and house-price statistics usually quote the median.

Common mistakes

  • Not sorting first. The median only works on ordered data.
  • Forgetting repeated values. Every copy counts towards n and the mean.
  • Inventing a mode. If every value appears once, there is no mode. If two values tie for most common, the data is bimodal.
  • Calling the range an average. It measures spread, not centre.
One outlier, three averages: pay in a town of 50 (£)
Mean pay£129,400
Median pay£30,000
Mode pay£30,000
Based on OpenStax Example 2.27. Calculated by My Web Stats.
Quick quiz: test yourself
1. What is the median of 2, 3, 4, 7, 7, 9, 10?
2. What is the mean of 4, 8, 15, 16, 23, 42?
3. Which average is better when the data has a big outlier?

Frequently asked questions

Can a set of data have more than one mode?

Yes. If two values tie for most common, the data is bimodal. OpenStax gives the example 430, 430, 480, 480, 495, where both 430 and 480 are modes.

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

Sort the values and average the two middle ones. For 4, 8, 15, 16, 23, 42 the median is (15 + 16) ÷ 2 = 15.5.

Is “average” the same as the mean?

In everyday use, yes: “average” usually means the mean. Strictly, the median and mode are averages too, so check which one a statistic uses.

Related: what “n” means in statistics, how to find a percentile, or browse more statistics by topic.

Sources

Leave a Reply