Median and Mode Calculator
The median is the value that sits exactly in the middle once the data has been ordered from smallest to largest: half of the values fall below it and half above it. Because it is not pulled by extreme observations, it is a more trustworthy measure of the center than the mean for skewed variables such as income, prices, and scores. The mode is the value that occurs most often in the data set; if nothing repeats, there is no mode.
This calculator returns the median, the mode (when there is one), the arithmetic mean, and the quartiles (Q1 and Q3) in a single pass, along with the interquartile range and a frequency table for every value. It is built for students checking homework, researchers exploring data, and anyone putting a report together.
Formula
Median (n odd) = the value in the exact middle of the ordered data Median (n even) = the mean of the two middle values Mode = the value (or values) that occur most often IQR = Q3 − Q1 (interquartile range)
The most common mistake is taking the middle value without ordering the data first. The median is always read off the sorted data; the order in which the values were entered makes no difference.
How to Calculate
- Paste your data values into the box — separate them with commas, spaces, or line breaks.
- The calculator sorts the data from smallest to largest for you; there is no need to order it yourself.
- Read the median, the mode (if there is one), the mean, and the quartiles in the results section.
- Use the frequency table to see how many times each value occurs.
Worked Examples
An odd number of values (n = 7)
Sorted, the data reads 3, 3, 5, 7, 8, 9, 12, so the fourth value, 7.00, is the median. The value 3.00 appears twice, making it the mode. The mean is 6.71, with Q1 = 4.00, Q3 = 8.50, and IQR = 4.50.
Median: 7.00 · Mode (most frequent value): 3.00 · Mean (x̄): 6.71
An even number of values, with no mode
With n = 4 the median is the mean of the two middle values, 20 and 30, which gives 25.00. No value repeats, so there is no mode. The mean is also 25.00, with Q1 = 17.50, Q3 = 32.50, and IQR = 15.00.
Median: 25.00 · Mode (most frequent value): No mode · Mean (x̄): 25.00
Salary data with an outlier
For a five-person team earning 4,000, 4,500, 5,000, 5,500, and 25,000, the median is 5,000 while the mean is 8,800.00. The single high salary drags the mean upward, whereas the median still reflects the typical salary.
Median: 5,000 · Mode (most frequent value): No mode · Mean (x̄): 8,800.00