Median Calculator

Paste a list of numbers to find the median — the middle value — plus mean, count, range, and quartiles.

Separate values with commas, spaces, or new lines.

Quick Facts

Method
Middle value of the sorted list
Odd count: the single middle value. Even count: the average of the two middle values.

Your Results

Calculated
Median
-
Middle value of the sorted data
Mean (average)
-
Sum ÷ count
Count
-
How many values
Range
-
Max − min
Minimum
-
Smallest value
Maximum
-
Largest value
Q1 (25th pct)
-
Lower quartile
Q3 (75th pct)
-
Upper quartile

Ready

Enter your numbers and press Calculate.

What the median is

The median is the middle value of a dataset once the numbers are sorted from smallest to largest. Exactly half of the values fall at or below the median and half fall at or above it, which is why the median is also called the 50th percentile or the second quartile (Q2).

How to calculate the median

There are only two cases, and they depend on whether you have an odd or even count of values (n):

  • Odd count (n is odd): sort the values and take the single middle one — the value at position (n + 1) / 2. For 3, 5, 8, 12, 20, 21, 22 there are 7 values, so the median is the 4th value: 12.
  • Even count (n is even): sort the values and take the two middle values — positions n/2 and n/2 + 1 — then average them. For 3, 5, 8, 10 the two middle values are 5 and 8, so the median is (5 + 8) / 2 = 6.5.

Sorting is the only step people skip; the values must be in order before you pick the middle. Duplicate values are counted individually — they are not collapsed into one entry.

Median vs. mean vs. mode

  • Median: the middle value. It is resistant to outliers, so it is the honest "typical" figure for skewed data such as household income, home prices, or wait times.
  • Mean (average): the sum divided by the count. It uses every value's exact magnitude, so a single extreme value pulls it up or down. Best for roughly symmetric data.
  • Mode: the most frequently occurring value. Useful for categorical data or spotting the most common outcome.

When the mean is noticeably larger than the median, the data is right-skewed (a few large values stretch the tail). When the mean is smaller than the median, the data is left-skewed. When they are equal, the data is symmetric.

Why the median matters

Because it ignores how far the extremes are and only cares about position, the median is the standard measure of center for money and time. "Median household income" and "median home sale price" are reported precisely because one billionaire or one mansion would badly distort the mean, while the median stays anchored to the middle household. The median is also the center line of a box plot, and Q3 − Q1 (the interquartile range) is the box's height.

Frequently Asked Questions

How do you find the median of a list of numbers?
Sort the numbers from smallest to largest. If the count is odd, the median is the single middle value. If the count is even, average the two middle values. Example: the median of 3, 5, 8 is 5; the median of 3, 5, 8, 10 is (5 + 8) / 2 = 6.5.
Do I need to sort the numbers first?
Yes. The median is defined by position in the sorted order, so you must arrange the values from smallest to largest before choosing the middle. This calculator sorts them for you automatically.
What is the median if there are two middle numbers?
When the count is even there are two middle values. The median is their arithmetic average (add them and divide by two). Note that this value need not appear in the original dataset — for example, the median of 4 and 7 is 5.5.
Why use the median instead of the mean?
The median is not distorted by outliers or skew. For income, home prices, or response times, a few very large values inflate the mean but leave the median near the true "typical" value, so the median is usually the more representative figure.