Median Calculator

What's the middle value in your dataset?

Calculate the median (middle value) of any set of numbers. The median is the value that separates the higher half from the lower half of your dataset, making it essential for understanding data distribution and avoiding outlier bias.

Updated June 2026 · How this works

Example calculation — edit any field to use your own numbers

Worth knowing
How It Works
The formula, explained simply

Imagine lining up every person in your company by salary from lowest to highest. The median is the salary of the person standing exactly in the middle — half earn more, half earn less. Unlike calculating an average, it doesn't matter if the CEO makes 50 times more than everyone else. That extreme value sits at the end of the line but doesn't move the middle person.

The median splits any dataset into two equal halves by count, not by value. If you have 11 test scores, the median is the 6th score when sorted — 5 scores below it, 5 above. With 10 scores, there's no single middle, so you average the 5th and 6th scores. This mathematical precision makes median perfect for datasets where a few extreme values would distort the typical picture.

What makes median powerful is its resistance to outliers. Add a billionaire to a room of middle-class workers, and the average income skyrockets while the median barely budges. Remove the billionaire, and the median stays nearly identical while the average plummets. This stability makes median the preferred measure when you want to understand what's normal or typical in your data.

When To Use This
Right tool, right situation

Use median when analyzing income, housing prices, test scores, or any data where a few extreme values might mislead. Real estate agents quote median home prices because a single mansion shouldn't inflate expectations for typical buyers. HR departments report median salaries because executive compensation shouldn't skew worker pay analysis.

Median works best with continuous data or ordinal rankings where position matters. It's perfect for reaction times, ages, scores, prices, or survey responses on numerical scales. If your data clusters around a center with occasional outliers, median gives you that center without the outlier interference.

Avoid median when you need to account for the total or when extreme values carry important meaning. If you're calculating total budget impact, use the average — every salary matters for the total payroll cost. When outliers represent important exceptions rather than measurement errors, the average might tell a more complete story than the outlier-resistant median.

Common Mistakes
Why results sometimes look wrong

The biggest mistake is confusing median with mode (most frequent value) or assuming median always equals the middle number you see. Median requires sorting first — the middle value in your original unsorted list means nothing. If your data is 100, 5, 200, the median isn't 5 just because it sits in the middle position.

Another common error is incorrectly handling even-sized datasets. Many people pick either of the two middle values instead of averaging them. In the dataset 2, 4, 6, 8, some choose 4 or 6 as the median, but the correct answer is 5. This averaging step ensures the median truly represents the center point.

People also misuse median with categorical data or ordinal scales without meaningful midpoints. You can't find the median of colors (red, blue, green) or satisfaction ratings unless the categories have a natural order and equal spacing. Median works with numbers and ranked data where 'between' makes mathematical sense.

The Math
Worked examples and deeper derivation

The median calculation follows a simple two-step process: sort the data, then find the middle. For odd-sized datasets with n values, the median is the value at position (n+1)/2. For even-sized datasets, it's the average of the values at positions n/2 and (n/2)+1. This positioning ensures exactly half the data falls on each side.

Mathematically, median minimizes the sum of absolute deviations — the total distance from each data point to the center. While mean minimizes squared deviations, median minimizes absolute deviations, making it less sensitive to extreme values. A single outlier can shift the mean dramatically but moves the median by at most one position in the sorted list.

The median's mathematical properties make it the 50th percentile of any dataset. This connection to percentiles explains why median income appears in economic reports — it represents the income level that splits the population in half. Unlike arithmetic mean, median has no closed-form formula for grouped data, requiring the actual data points to calculate precisely.

Finding median salary in a small team
Team salaries: $45,000, $52,000, $48,000, $120,000, $50,000
Median is $50,000. Unlike the average ($63,000), the median ignores the outlier executive salary, giving you the typical team member's pay level.
Analyzing test scores with outliers
Quiz scores: 78, 85, 92, 88, 15, 90, 87
Median score is 87. The single failing grade (15) doesn't drag down the median like it would the average, showing most students performed well.
Real estate price analysis
House prices in neighborhood: $280K, $310K, $295K, $1.2M, $305K, $288K
Median price is $300,000. The luxury home doesn't inflate the median, giving homebuyers a realistic expectation of typical neighborhood prices.
Expert Unlock
The thing most explanations skip

Statisticians prefer median for non-parametric analysis because it makes no assumptions about data distribution. Unlike mean-based statistics that assume normality, median-based methods work with any distribution shape. This robustness makes median central to non-parametric hypothesis testing and confidence interval construction.

What's the difference between median and average?

What's the difference between median and average?
The median is the middle value when numbers are arranged in order, while the average (mean) is the sum divided by count. The median ignores outliers completely — one extremely high or low value won't change it. The average gets pulled toward outliers, making median better for understanding typical values in skewed datasets.
How do you find the median of an even number of values?
When you have an even number of values, there's no single middle number. Take the two middle values and average them together. For example, in the dataset 2, 4, 6, 8, the two middle values are 4 and 6, so the median is 5.
When should I use median instead of average?
Use median when your data has outliers or is skewed — like income, house prices, or test scores with a few very high or low values. Median gives you the typical value that half the data falls above and half falls below. Use average when your data is normally distributed without extreme outliers.

Need something this doesn't cover?

Suggest a tool — we'll build it →