Math

Median Calculator

The sorted middle of your data — exact position law for odd and even counts, the worked order shown, and the honest answer when a billionaire walks into the room.

Median Calculator

Results recalculate instantly on every keystroke. Nothing you type is transmitted.

The values
Median
—
Position—
Sorted order—
Note—

What this result does not account for

  • Univariate only — one list per run
  • No grouped-data (class intervals) median
● Zero-Server Execution Updated 11 Aug 2026 Reviewed by Sana Khalid IEEE-754 Double Precision

In short: The median of 12, 15, 18, 22, 28 is 18 — the 3rd of 5 sorted values, at position (5+1)/2. For an even count the median is the mean of the two middle values: 12, 15, 18, 22, 28, 90 sorts to a middle pair of 18 and 22, and (18+22)/2 = 20. On the outlier set 3, 7, 9, 15, 100 the median is 9 while the mean is 26.8 — same data, different stories.

Formula

sort → n odd: value at (n+1)/2

n even: mean of values at n/2 and n/2 + 1

the median is a position, not a sum.

Worked Example

  1. Sort. order every value smallest to largest — the median is the only average that cannot even be defined unsorted.
  2. Count. n decides the route: odd counts land ON a value, even counts land BETWEEN two.
  3. Read. odd: take position (n+1)/2. even: average positions n/2 and n/2+1 — nothing else is admissible.

On 12, 15, 18, 22, 28 the median 18 is also a member of the data. On the even set the median 20 is a NEW number — both are correct; the count decides.

Strengths & Limits Of This Model

Where this engine is strong

  • Position law printed for the exact count entered
  • Outlier-proof by construction, and the page says why

Where it stops

  • No weighted median
  • No percentile ladder beyond the middle

Risk & accuracy notice. A median flatters a failing system when quoted alone: the typical case is fine while the tail is on fire. This page computes the middle honestly and points at the Range page for the width the median cannot see.

Practical Use Cases

Household income

medians resist the billionaire effect

Response times

one cold start must not move the story

Test scores

the middle student, not the mean of a curve

Methodology & Editorial Standards

Sort the parsed values ascending. Odd n: the median is value (n+1)/2. Even n: the mean of values n/2 and n/2+1. The sort and the position are exact — no floats are invented along the way; the even-count mean is the only arithmetic performed.

Computation runs in IEEE-754 double precision at full internal precision; rounding to two decimal places occurs strictly at the display layer, so no cumulative drift enters the result. All monetary outputs use accounting presentation — grouped thousands, two decimals, negatives in parentheses — so figures can be transcribed directly into a model or working paper. Division-by-zero and out-of-domain inputs return an em-dash rather than a misleading number.

This engine was reconciled against an independent reference implementation and hand-verified for the worked example above before release. Our full five-stage review process is published on the About Us page.

Sana Khalid Principal Front-End Engineer · ApexConverter

Numerical methods and floating-point precision engineering. Last reviewed: 11 August 2026.

Disclaimer. This calculator is provided for informational and modelling purposes only and does not constitute financial, tax, legal, medical, or engineering advice. Verify all figures with a qualified professional before acting on them.


Median Calculator — 8 Expert FAQs

8 analyst-written answers to the questions practitioners actually ask — optimised for voice and answer-engine retrieval.

What is the median in plain words?

Line the values up in order and stand in the middle. Half the data sits at or below you, half at or above. For an even count there is no middle value, so the two middle values share the job and the median is their mean.

Why is the median of an even count the MEAN of the two middle values?

Convention, but a forced one: no data point sits at the middle, so any representative must be invented — and the midpoint of the two candidates is the only choice that treats them evenly. Any value strictly between them would split the data 50/50 too; the mean is the convention everyone standardized on.

How is this different from the mean?

The mean divides a SUM, so every value — including extremes — pulls on it. The median only ranks, so it moves at most to the next position when an extreme arrives. On 3, 7, 9, 15, 100 the mean is 26.8 and the median is 9: the mean answered a question about totals, the median answers a question about position.

My data has decimals — still fine?

Yes. Sorting and positioning do not care how the values were written: 2.5, 2.75, 3 has median 2.75 exactly as integers would.

What if the same value appears many times?

Repetition does not bother the median — duplicates each take a seat in the sorted line. 5, 5, 5, 5, 9 has median 5 because the middle SEAT holds a 5, not because 5 is popular (that is the mode’s question).

Does the median ignore the data?

It reads only the ORDER, which is its strength and its limit: the largest value can grow without bound and the median shrugs. If you need the extremes to matter, that is the mean’s job — the Average page computes it and this wave’s Range page measures the damage.

Median page or Average page?

Different questions about one dataset. The Average page owns the SUM story — total, count, and the outlier doctrine on its own card. This page owns the POSITION story: sort, split, read the middle. Analysts quote both on the same data precisely because they disagree when the data is skewed.

What is a percentile, then?

A generalization of the same idea: the median IS the 50th percentile — the value below which half the data sits. Quartiles extend the split to quarters, and they live on the Range page here as the IQR, because a quartile spread is a WIDTH question, not a middle question.

Related Math Engines