Skip to content

Median, Mode and Quartile Calculator

Enter a list of numbers to get the median and mode, the five-number summary used for box plots, and the interquartile range with outlier limits.

Result

Median
12
Mode
No mode, every value appears once
Sorted data
3, 5, 7, 8, 12, 13, 14, 18, 21
Range
18
Minimum
3
First quartile (Q1)
6
Third quartile (Q3)
16
Maximum
21
Interquartile range (IQR)
10
Mean
11.222222
Midrange
12
Count
9
Outlier fences
below -9 or above 31
Outliers
None

Quartiles are the medians of the lower and upper halves of the sorted data. When the count is odd, the overall median is left out of both halves. Spreadsheet functions use interpolation and can give slightly different quartiles.

Formula

  • Median: the middle value of the sorted list, or the mean of the two middle values
  • Q1 and Q3: the medians of the lower and upper halves
  • IQR = Q3 − Q1
  • Outlier fences: Q1 − 1.5 × IQR and Q3 + 1.5 × IQR

How the Median, Mode and Quartile Calculator works

The median splits sorted data in half. With an odd number of values it is the middle one. With an even number it is the average of the two in the middle. Unlike the mean, it is not affected by extreme values.

Quartiles split the data into four parts. The interquartile range covers the middle half and is the box in a box plot. Values more than 1.5 times that range beyond the quartiles are commonly flagged as outliers.

Worked example

Sorted, the data 3, 5, 7, 8, 12, 13, 14, 18, 21 has nine values, so the median is the fifth: 12. The lower half 3, 5, 7, 8 has a median of 6, and the upper half 13, 14, 18, 21 has a median of 16. The IQR is 16 − 6 = 10.

Frequently asked questions

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

Sort them and average the two middle values. For 2, 4, 6, 8 the median is (4 + 6) ÷ 2 = 5.

Can a data set have more than one mode?

Yes. If two or more values tie for the highest frequency, all of them are modes. If every value occurs once, there is no mode.

What is the five-number summary?

The minimum, first quartile, median, third quartile and maximum. Together they describe the spread of the data and define a box plot.

Related calculators

All math and statistics calculators · All calculators

Related unit converters

Calculations run in your browser and nothing you enter is sent to a server. Results are provided for general information. Check critical figures independently before relying on them.

☕ Like this tool?

Buy me a coffee to support development

☕ Support UnitGenie

If this tool has been helpful, consider buying me a coffee to support development and keep it free for everyone!