Math

Median Calculator

Find the median of a dataset.


Median Calculator

Advertisement

Finds the middle value of a dataset once it’s sorted from smallest to largest.

How it works

The dataset is sorted, then the single middle value is returned — or, for an even count, the average of the two middle values.

What this does not include

This does not include mean or mode alongside the median — this calculator specifically returns the median value only, matching that narrower search intent directly.

How to use this calculator

  1. Enter your dataset as comma-separated numbers.

A worked example

Dataset 3, 1, 4, 1, 5, 9, 2 (7 values, odd count) sorts to 1, 1, 2, 3, 4, 5, 9 — the middle value is 3.

Dataset 3, 1, 4, 1, 5, 9 (6 values, even count) sorts to 1, 1, 3, 4, 5, 9 — the two middle values (3 and 4) average to 3.5.

What the calculation does

Dataset size Median is
Odd count The single middle value after sorting
Even count The average of the two middle values after sorting

Edge cases worth knowing

A single-value dataset has that value as its own median — there’s nothing to sort or average.

Median ignores how extreme the outer values are, only their position — a dataset of 1, 2, 3 and one of 1, 2, 300 share the identical median (2), even though their spread is wildly different.

Frequently asked questions

Why use median instead of mean (average)?

Median resists distortion from extreme outliers, since it only cares about the middle position rather than every value’s magnitude — a useful property for skewed data like incomes.

What happens with an even number of values?

There’s no single middle value, so the two middle values are averaged together to give the median.

Does the order I enter values in matter?

No — the calculator sorts the data automatically before finding the median, regardless of the order you type it in.

Be the first to rate this

Written by

J. Adeyemi

Statistics writer

J. Adeyemi writes the statistics and probability calculators, from descriptive summaries through to distributions and conditional probability. The recurring theme is scope: each page states precisely which question it answers, because most statistical mistakes come from applying a correct formula to the wrong question. Related-but-different measures get separate pages rather than being quietly merged.

Reviewed by

T. Okafor

Calculator reviewer — mathematics

T. Okafor reviews the mathematics calculators, verifying algebraic correctness and, just as importantly, behaviour at the edges — division by zero, undefined results, and the floating-point cases where a formula technically returns a number that should be reported as undefined. Every test case is recomputed independently rather than taken on trust.

How we write and review

Related calculators