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
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
- Average CalculatorCalculate the average (mean) of a list of numbers, with the sum, count, median, mode, range and geometric mean.
- Standard Deviation and Variance CalculatorCalculate sample and population standard deviation and variance for a data set, with the mean, sum of squares and standard error.
- Z-Score CalculatorCalculate a z-score from a value, mean and standard deviation, with the percentile and the normal distribution probabilities above, below and between.
- Ratio CalculatorSimplify a ratio, solve for a missing value in A : B = C : D, or split a total in a given ratio. Works with whole numbers and decimals.
- Proportion CalculatorSolve a proportion a/b = c/d for the missing value by cross-multiplication. Enter any three of the four numbers.
- Factor CalculatorFind all factors of a number, its factor pairs and its prime factorization. Also tells you whether the number is prime.
- GCF Calculator (Greatest Common Factor)Find the greatest common factor of two or more numbers, with the Euclidean algorithm steps and prime factorizations. Also gives the LCM.
- LCM Calculator (Least Common Multiple)Find the least common multiple of two or more numbers, with prime factorizations. Also gives the greatest common factor.
- Rounding CalculatorRound a number to the nearest whole number, tenth, hundredth, thousandth, ten, hundred or thousand. Exact decimal rounding with no floating point errors.
- Significant Figures CalculatorCount the significant figures in a number and round it to any number of significant figures, with scientific notation.
- Modulo CalculatorCalculate a mod n, the remainder after division, with the quotient. Handles negative numbers under both the mathematical and programming conventions.
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.