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) / 3Variables
| Variable | Description | Default |
|---|---|---|
a | Value 1 | 7 |
b | Value 2 | 3 |
c | Value 3 | 12 |
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
- 01Sort the values: 3, 7, 12
- 02The middle value is 7
- 03Alternatively: 7 + 3 + 12 - min(3,7,12) - max(3,7,12) = 22 - 3 - 12 = 7
Ready to run the numbers?
Open Median Calculator