Calculate MEDIAN in Excel

If you just need to calculate median in excel and move on, the boxed answer at the top is all you need. The rest of this page is for when you want to understand why it works in Excel, adapt it to a trickier version, or make it robust enough to hand to a colleague. We keep the opening short on purpose — the depth is here when you want it, not in your way when you don’t.

Exact answer

In Excel: use =MEDIAN(range) — it returns the middle value once the numbers are ordered, which outliers cannot drag around the way they drag a mean.

On this page8

Syntax

=MEDIAN(number1, [number2], ...)

Arguments

Argumentrequired / optionalDescription
number1requiredThe first number or range.
number2, ...optionalFurther values or ranges. Text and blanks are ignored.

Related functions

AVERAGEMODEQUARTILE
ƒxAverage, Median & ModeLive

n = 7 · Sum = 103.00 · Min = 9.00 · Max = 21.00

Average (mean)
14.71

7 values

Median
15.00
Mode
15.00
=AVERAGE(A1:A7) · =MEDIAN() · =MODE.SNGL()
Ctrl+CthenCtrl+Shift+V+Cthen+Ctrl+VPaste values · WindowsMac

Need it as an auditable file?

Ships inside the linked template — formula-driven, unlocked, audit-ready.

View template

What this does

MEDIAN returns the middle value of a sorted set, or the average of the two middle values when the count is even. You do not need to sort anything first — the function handles ordering internally. Its defining property is resistance to outliers: one enormous value moves a mean substantially and a median barely at all. That is why salary, house price and response-time reporting quote medians. Comparing the mean and the median of the same column is the fastest skew test available in a spreadsheet: if they diverge, the distribution has a tail. The same idea underpins a lot of everyday Excel work, so the few minutes spent getting it right here pay back across every sheet you build afterwards. Treat it as a pattern, not a one-off, and it stops being something you look up and starts being something you reach for. For “calculate median in excel”, the reliable version is a short checking loop, not just the first command that appears to work. Run it on a deliberately small range first, watch how the affected cells change, and only then apply the same setup to the full sheet. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. That is what makes a calculation you can defend to a CFO or an auditor useful in real work: repeatable, auditable, and not dependent on memory or luck.

A worked example

Salaries in C2:C200 including three executive packages: =MEDIAN(C2:C200) reports the typical salary, while =AVERAGE(C2:C200) sits well above it because of those three. Response times in D2:D500 behave the same way — the median is what an ordinary user experiences, the mean is what the worst outages do to the figure. MEDIAN is the summary that survives outliers, which is why it is the honest headline figure for pay, prices and response times. A practical tip before you scale it up: build it once on a small block of test data, confirm the number against the tool on this page, and only then point it at your real sheet. That one habit catches almost every mistake while it is still cheap to fix, long before a wrong figure reaches a report or a colleague.

In Google Sheets

Google Sheets handles this almost identically to Excel. The formula syntax above is the same, and the menu lives under a slightly different label rather than a ribbon tab. Use the platform toggle at the top of the page to switch every keyboard shortcut between Windows and Mac, and expect at most cosmetic differences in naming. Nothing on this page is behind a login: the tool runs entirely in your browser, the formula is shown in full with one-click copy, and the steps work the same on Windows and Mac. That is the whole promise here — the exact answer, a way to prove it on your own numbers, and just enough context to make it stick. The short version of “calculate median in excel”: the answer is at the top of this page, the tool proves it on your own numbers, and the sections above explain why it holds so the next variation does not stump you. Excel rewards people who reference cells instead of typing values and who keep inputs separate from formulas, because that is what makes a result you can audit months later. Build it once, deliberately, with the live tool as a check, and you convert a one-off lookup into a reusable skill — which is the whole point of learning the why and not just the what.

Common mistakes

  • Sorting the data first in the belief that MEDIAN needs it — it does not, and the sort risks disturbing the sheet.
  • Reporting a mean on skewed data out of habit, where the median is the honest summary.
  • Expecting the median of an even-sized set to be an actual data point; it is the average of the two central values.

Frequently asked questions

What is the difference between MEDIAN and AVERAGE?

AVERAGE is the total divided by the count and is pulled by extremes. MEDIAN is the middle value and is not. On skewed data they can differ substantially.

Do I need to sort the data first?

No. MEDIAN orders the values internally.

What does MEDIAN return for an even number of values?

The average of the two middle values, which may not be a value that appears in the data.

Other ways people ask this

On the way here you may have searched this as “calculate the median in excel”, “how do you calculate median in excel”, “how to calculate median excel” and “how to calculate a median in excel” — it is all the same task, and this page is the single, complete answer to it.

Why do people search for this in so many different ways?

Because the same task has many names. “calculate the median in excel”, “how do you calculate median in excel”, “how to calculate median excel” all point at the one operation explained on this page, which is why they all lead here.