What is a Median Calculator?
A median calculator (or median finder) sorts your numbers and returns the middle one. With an odd count n, the median is the value in position (n + 1) / 2; with an even count, it is the average of the two middle values. Half the data lie at or below the median and half at or above it, and unlike the mean it is barely moved by outliers.
What the Median Calculator does
Enter a list of numbers in any order. The calculator sorts them, shows the sorted list with the middle position highlighted, and returns the median along with the position rule it used. For an odd number of values you get the single middle value; for an even number you see the two middle values and their average. Each sorted row also shows where that value appeared in your original list, so you can trace any number back. It works as a median finder for any list, sorted or not, from two numbers to several thousand.
The median is the go-to measure of a typical value when the data are skewed or contain outliers: house prices, incomes, rents, waiting times and reaction times are usually summarized by their median. The calculator therefore also shows the mean for comparison and says which way, and how far, the mean is being pulled. If you need the mean, median, mode and range together, use the Mean, Median, Mode Calculator instead; this page is for the median alone, with the full sorted list and position working.
How to use the Median Calculator
- Type or paste your numbers into Data values, separated by commas, spaces or new lines. You do not need to sort them, and you can paste a column straight from Excel or Google Sheets.
- Read the median and the note underneath, which says whether it is a single middle value or the average of two.
- Look at the highlighted rows in the Sorted data table to see exactly which values are in the middle.
- Compare the median with the mean in the statistics panel. A large gap means the data are skewed.
How to calculate the median by hand
To calculate the median of a data set, follow three steps, whatever its size:
- Sort the values from smallest to largest.
- Count the values to get n, then find the middle position, (n + 1) / 2.
- Read off the middle value. If (n + 1) / 2 ends in .5, there is no single middle value, so average the two values on either side of it.
Median with an odd number of values
Take the seven values 14, 3, 9, 21, 7, 12, 5. Sorted, they are 3, 5, 7, 9, 12, 14, 21. The middle position is (7 + 1) / 2 = 4, and the 4th value is 9. Three values lie below 9 and three above it, so 9 is the median.
With an odd count, the median is always one of the data values. Click Odd count in the examples above the calculator to see this data set worked through.
Median with an even number of values
Take the ten values 3, 7, 2, 4, 7, 5, 7, 1, 8, 8. Sorted, they are 1, 2, 3, 4, 5, 7, 7, 7, 8, 8. The middle position is (10 + 1) / 2 = 5.5, so the median lies halfway between the 5th value (5) and the 6th value (7): (5 + 7) / 2 = 6.
With an even count, the median can be a number that is not in the data, as 6 is here. The same rule gives the median of 1, 2, 3, 4, 5, 6, 7, 8, 9 and 10: the 5th and 6th values are 5 and 6, so the median is 5.5.
| Data | Sorted | n | Median |
|---|---|---|---|
| 40, 30, 10, 7, 5, 3, 2, 2, 1 | 1, 2, 2, 3, 5, 7, 10, 30, 40 | 9 (odd) | 5 |
| 45, 52, 38, 61, 44 | 38, 44, 45, 52, 61 | 5 (odd) | 45 |
| 19, 44, 16, 26, 12 | 12, 16, 19, 26, 44 | 5 (odd) | 19 |
| 12, 16, 0, 8, 31, 28, 17 | 0, 8, 12, 16, 17, 28, 31 | 7 (odd) | 16 |
| 82, 85, 85, 90 | 82, 85, 85, 90 | 4 (even) | (85 + 85) / 2 = 85 |
| 82, 91, 88, 93 | 82, 88, 91, 93 | 4 (even) | (88 + 91) / 2 = 89.5 |
| 26, 30, 24, 32, 32, 31, 27, 29 | 24, 26, 27, 29, 30, 31, 32, 32 | 8 (even) | (29 + 30) / 2 = 29.5 |
Median formula
Sort the data so that x₍₁₎ ≤ x₍₂₎ ≤ … ≤ x₍ₙ₎. Then:
| Symbol | Meaning |
|---|---|
| n | number of values |
| x₍ₖ₎ | the k-th smallest value (the k-th value after sorting) |
A common slip is to use n / 2 as the position. For n = 7, n / 2 = 3.5, but the middle value is the 4th one: (7 + 1) / 2 = 4. For data already grouped into classes, the median is estimated by interpolation; the Grouped Data Mean Calculator does this for a frequency table.
These definitions follow the NIST/SEMATECH e-Handbook of Statistical Methods, Measures of Location.
Worked example
Worked example: weekly rents
Problem. Eight listings quote weekly rents of $420, $180, $270, $350, $500, $230, $310 and $290. What is the median rent?
- 01Sort: 180, 230, 270, 290, 310, 350, 420, 500.
- 02Position: (8 + 1) / 2 = 4.5, so the median lies halfway between the 4th and 5th values.
- 03The 4th value is 290 and the 5th is 310.
- 04Median = (290 + 310) / 2 = 300.
- 05For comparison, the mean is 2,550 / 8 = 318.75, pulled up by the $500 and $420 listings.
Answer. The median weekly rent is $300: four listings are cheaper and four are more expensive. The mean of $318.75 is higher because the two priciest listings stretch the upper end.
How to find the median between two numbers
With only two numbers, both of them are the middle values, so the median between two numbers is their average: (a + b) / 2. The median of 14 and 27 is (14 + 27) / 2 = 20.5, which is also the midpoint halfway between them on the number line. Enter the two numbers in the calculator above to check any pair.
Median vs mean vs mode
All three describe the center of a data set, but they answer slightly different questions. In symmetric data they are close together; in skewed data the mean is pulled toward the long tail while the median stays with the bulk of the values. To get all three at once, use the Mean, Median, Mode Calculator; for the mean alone, use the Mean Calculator; for the most frequent value, the Mode Calculator.
Median symbol and notation
There is no single universal symbol. The sample median is most often written x̃ (x-tilde) or M, and sometimes Md or Med. In formulas, the sorted values are written with bracketed subscripts, x₍₁₎ ≤ x₍₂₎ ≤ … ≤ x₍ₙ₎, so x₍₄₎ means the 4th smallest value. Because the median is the 50th percentile, it is also written Q₂ (the second quartile) or P₅₀; see the Quartile Calculator and Percentile Calculator.
How to calculate the median in Excel or Google Sheets
Put the values in one column, for example A2:A11, and type =MEDIAN(A2:A11). Excel and Google Sheets sort the values internally, so the data do not need to be in order, and they return the same result as this calculator, including the average of the two middle values for an even count.
MEDIAN skips empty cells and text but counts zeros, so a blank and a 0 give different answers. To check a spreadsheet, paste the same column into the calculator above and compare.
Common use cases
- Prices and incomes: median house prices, rents and household incomes are standard because a few very high values would distort the mean.
- Waiting and response times: service levels and app response times are often reported as medians (the 50th percentile).
- Test and exam scores: the median score shows where the middle student sits, even when a few very low or very high marks skew the class average.
- Ordinal data: survey ratings such as 1 to 5 stars have a meaningful middle even when averaging them is questionable.
- Robust summaries: report the median with the IQR or median absolute deviation for data with outliers.
Assumptions and limitations
- The median ignores how far the extreme values are from the center; two datasets with the same median can have very different tails. Look at the five-number summary for the full picture.
- For symmetric data without outliers, the mean is a more efficient estimate of the center, meaning it varies less from sample to sample.
- Medians cannot be combined like means: the median of a combined dataset is not the average of the group medians. Recompute from all the values.
- For data grouped into class intervals, the exact median is unknown; it can only be estimated by interpolation.
Frequently asked questions
How do you calculate the median of a set of numbers?
How do you find the median with an even number of values?
How do you find the median between two numbers?
When should you use the median instead of the mean?
Why is the median better than the mean for skewed data?
Is the median the same as the 50th percentile?
Can the median be a value that is not in the data?
What is the symbol for the median?
How do you find the median of grouped data?
Cite this page
Statculator. (2026, November 14). Median Calculator. Retrieved November 14, 2026, from https://statculator.com/descriptive-statistics/median-calculator/