Median Calculator Formula

Understand the math behind the median calculator. Each variable explained with a worked example.

Formulas Used

Median

median = a + b + c - min(min(a, b), c) - max(max(a, b), c)

Minimum

minimum = min(min(a, b), c)

Maximum

maximum = max(max(a, b), c)

Mean

mean = (a + b + c) / 3

Variables

VariableDescriptionDefault
aValue 17
bValue 23
cValue 312

How It Works

How to Find the Median

Method

1. Sort the numbers from smallest to largest 2. The median is the middle number

For 3 values, the median equals the sum minus the minimum minus the maximum:

Median = a + b + c - min(a,b,c) - max(a,b,c)

Worked Example

Find the median of 7, 3, and 12.

a = 7b = 3c = 12
  1. 01Sort the values: 3, 7, 12
  2. 02The middle value is 7
  3. 03Alternatively: 7 + 3 + 12 - min(3,7,12) - max(3,7,12) = 22 - 3 - 12 = 7

Ready to run the numbers?

Open Median Calculator