Median Calculator

What is the Median?

The median is the middle value in a sorted list of numbers. It represents the value that separates the higher half from the lower half of a dataset. Unlike the mean (average), the median is not affected by extreme values or outliers, making it a more robust measure of central tendency for skewed distributions.

For odd number of values: Median = Middle value

For even number of values: Median = (n/2 + (n/2+1)) ÷ 2

How to Calculate the Median

Step-by-Step Process

  1. Sort the numbers: Arrange all values in ascending order (smallest to largest)
  2. Count the values: Determine how many numbers are in your dataset
  3. Find the middle:
    • If odd number of values: The median is the middle number
    • If even number of values: The median is the average of the two middle numbers

Example 1: Odd Number of Values

Dataset: 3, 1, 4, 1, 5

Sorted: 1, 1, 3, 4, 5

Median: 3 (the middle value)

Example 2: Even Number of Values

Dataset: 2, 4, 6, 8

Sorted: 2, 4, 6, 8

Median: (4 + 6) ÷ 2 = 5

Median vs Mean vs Mode

Measure Definition Best Used When Affected by Outliers
Median Middle value in sorted data Skewed data or with outliers No
Mean Sum of values divided by count Normally distributed data Yes
Mode Most frequently occurring value Categorical data No

When to Use the Median

The median is particularly useful in the following situations:

  • Income data: When dealing with salary or income data where a few high earners might skew the average
  • House prices: Property values often have outliers that make the median more representative
  • Test scores: When a few very high or low scores might distort the mean
  • Survey responses: Likert scale data where the median provides a better central measure
  • Ordinal data: Data that can be ranked but doesn’t have equal intervals

Properties of the Median

  • Resistant to outliers: Extreme values don’t affect the median significantly
  • Unique value: There is always exactly one median for any dataset
  • Position-based: Depends on the position of values, not their actual magnitude
  • 50th percentile: The median is always the 50th percentile of the data
  • Interpretable: Easy to explain and understand

Frequently Asked Questions

What if there are repeated values?

Repeated values are included in the sorting process. If the median falls on a repeated value, that value is still the median. The median doesn’t change based on frequency of values.

Can the median be a decimal?

Yes, when you have an even number of values, the median is calculated as the average of the two middle numbers, which can result in a decimal value even if all original data points are whole numbers.

How does the median differ from the average?

The median is the middle value when data is sorted, whilst the average (mean) is the sum of all values divided by the count. The median is less affected by extreme values, making it better for skewed data.

What happens with very large datasets?

For large datasets, finding the median manually becomes impractical. Statistical software and calculators like this one can handle thousands of values efficiently by sorting the data and applying the median formula.

Is the median always a value from the dataset?

Not always. For odd numbers of values, the median is always one of the original values. For even numbers of values, the median might be the average of two values and therefore not appear in the original dataset.

Scroll to Top