01
How to find the mean, median and mode
- Mean: add all the values and divide by how many there are.
- Median: sort the values and take the middle one. With an even number of values, average the two middle ones.
- Mode: the value that occurs most often. There can be several modes, or none when every value occurs once.
- Geometric mean: the n-th root of the product of n positive values. Use it for ratios, growth rates and data that span orders of magnitude, such as titres and concentrations. For the example below it is 4.603, against an arithmetic mean of 5.
02
Worked example
The calculator opens with 2, 4, 4, 4, 5, 5, 7, 9.
| Measure | Calculation | Result |
|---|---|---|
| Mean | 40 ÷ 8 | 5 |
| Median | (4 + 5) ÷ 2 | 4.5 |
| Mode | 4 occurs three times | 4 |
| Range | 9 − 2 | 7 |
| Q1 and Q3 | see below | 4 and 5.5 |
| Interquartile range | 5.5 − 4 | 1.5 |
| Outliers | beyond 1.75 and 7.75 | 9 |
03
Which average to report
- Mean for roughly symmetric data. It uses every value, so one extreme value can pull it a long way.
- Median for skewed data or data with outliers (income, reaction times, length of hospital stay). Report it with the interquartile range.
- Mode for categories or discrete values, where a “most common” answer makes sense.
- When the mean and median differ noticeably, the data are skewed: the mean lies toward the longer tail.
04
Quartiles and the interquartile range
Q1 is the value below which a quarter of the data fall, Q3 the value below which three quarters fall. The interquartile range, Q3 − Q1, covers the middle half of the data.
position = (n − 1) × p, then interpolate between the two nearest sorted values
Several quartile conventions exist and give slightly different answers for small samples. This calculator uses linear interpolation, the default in R (type 7) and the method of Excel’s QUARTILE.INC. In the example Q3 sits at position 5.25 among the sorted values, between 5 and 7: 5 + 0.25 × 2 = 5.5.
05
How outliers are found
lower fence = Q1 − 1.5 × IQR · upper fence = Q3 + 1.5 × IQR
Values outside the fences are flagged, as on a standard box plot. The rule marks values worth a second look; it does not justify deleting them. Check for recording errors first, and if an outlier is genuine, keep it and prefer the median, or analyse the data with a rank-based method such as the Mann-Whitney U test.
06
Common mistakes with averages
- Reporting the mean of skewed data. Change the 9 in the example to 90 and the mean jumps from 5 to 15.125, while the median stays at 4.5.
- Averaging ratios with the arithmetic mean. A value that doubles and then halves ends where it started, but the arithmetic mean of 2 and 0.5 is 1.25; the geometric mean, 1, is the right answer.
- Calling a value the mode when nothing repeats. In the example 4 is the mode because it occurs three times; a list in which every value occurs once has no mode, and the calculator says so.
Trust
How this page is checked
- The calculation runs on code with automated tests against worked reference values. Every number in the examples on this page was produced by that same code, not typed by hand.
- The formulas and conventions used are stated on the page, so you can reproduce the result yourself or compare it with your own software.
- Last reviewed by the Sciloom team, Zebra Nine Studio Inc. It is a tool for research and teaching, not a substitute for a statistician, a validated lab method or medical advice.
Cite this page
Sciloom. (2026). Mean, median, mode calculator. Zebra Nine Studio Inc. https://sciloom.si/mean-median-mode-calculator
Frequently asked questions
What is the difference between mean and median?
The mean is the arithmetic average; the median is the middle value when the data are sorted. They are close for symmetric data and differ when the data are skewed.
What if there is no mode?
If every value occurs exactly once there is no mode, and the calculator shows “none”. If several values tie for most frequent, all of them are modes.
How do I find the median of an even number of values?
Sort them and average the two in the middle. For 2, 4, 4, 4, 5, 5, 7, 9 the middle values are 4 and 5, so the median is 4.5.
How do I identify outliers?
A common rule flags values more than 1.5 interquartile ranges below the first quartile or above the third quartile. The calculator lists them and marks them on the box plot.