BCBetter Calculators

Median Calculator

Find the median of up to 8 numbers.

🧮

Enter your values and click Calculate

How It Works

All entered values are collected into a list and sorted in ascending order. If the count of values is odd, the median is the single middle element — for example, the 4th value in a set of 7. If the count is even, there is no single middle element, so the median is calculated as the average of the two central values — for example, the average of the 3rd and 4th values in a set of 6. The mean is also provided for comparison by summing all values and dividing by the count. Additional statistics — minimum, maximum, and total count — are returned alongside the median to give a fuller picture of the dataset's spread without requiring a separate calculation.

Examples

Six values: 4, 8, 15, 16, 23, 42
Even count — median is the average of the two middle values after sorting.
Result: Sorted: 4, 8, 15, 16, 23, 42. Median = (15+16)/2 = 15.5.
Seven values including an outlier
Adding a large 7th value shows the median stays stable while the mean shifts.
Result: Median = 16 (unchanged middle value), mean = 86.86.
All equal values: 10, 10, 10, 10, 10, 10
When all values are the same, the median equals the mean.
Result: Median = 10, mean = 10.

Frequently Asked Questions

When should I use median instead of mean?
Use median when your data contains outliers or is skewed — a single extreme value cannot distort the median the way it shifts the mean. Income data, home prices, and response times are classic examples where median gives a more representative picture.
What happens with an even number of values?
When there is an even count of values, there is no single middle element. The median is defined as the average of the two central values after sorting. For six values, that means averaging the 3rd and 4th sorted numbers.
How is the median different from the mode?
The median is the physical middle of a sorted list, while the mode is the most frequently occurring value. A dataset can have one mode, many modes, or no mode at all, but it always has exactly one median.