How to Calculate Median
Find the median value of a sorted or unsorted dataset.
The Formula
Middle value when sortedThe median formula uses the mathematical relationship: Middle value when sorted. Each variable in the formula represents a measurable quantity that affects the final result.
What Each Variable Means
Every value in the median formula, what it measures, and the value used in the worked example on this page:
| Variable | Type | Example value |
|---|---|---|
| Value 1 | Input (you provide) | 3 |
| Value 2 | Input (you provide) | 1 |
| Value 3 | Input (you provide) | 4 |
| Value 4 | Input (you provide) | 1 |
| Value 5 | Input (you provide) | 5 |
| Mean | Result (calculated) | — |
| Minimum | Result (calculated) | — |
| Maximum | Result (calculated) | — |
| Range | Result (calculated) | — |
| Median | Result (calculated) | — |
| Mode | Result (calculated) | — |
| Mode Frequency | Result (calculated) | — |
Step-by-Step Method
- 1Write down the values you know: Value 1, Value 2, Value 3, Value 4, Value 5.
- 2Substitute your known values into the formula: Middle value when sorted.
- 3Work through the arithmetic in the standard order of operations — parentheses first, then exponents, then multiplication and division, then addition and subtraction.
- 4Check that your result carries the correct unit and falls in a reasonable range for the problem.
- 5Verify your answer with the interactive Median Calculator — it solves the same formula instantly.
Worked Example
Take a concrete case: value 1 = 2, with the other inputs at the typical values from the variables table above. Substituting into the formula gives mean = 2.6000, minimum = 1.0000, maximum = 5.0000, range = 4.0000, median = 2.0000, mode = 1.0000, mode frequency = 2. These numbers are solved by the same engine that powers the Median calculator, so you can reproduce them exactly by entering the same inputs there.
| Value 1 | Mean | Minimum | Maximum | Range | Median | Mode | Mode Frequency |
|---|---|---|---|---|---|---|---|
| 0.8 | 2.3600 | 0.8000 | 5.0000 | 4.2000 | 1.0000 | 1.0000 | 2 |
| 2 | 2.6000 | 1.0000 | 5.0000 | 4.0000 | 2.0000 | 1.0000 | 2 |
| 3 | 2.8000 | 1.0000 | 5.0000 | 4.0000 | 3.0000 | 1.0000 | 2 |
| 4 | 3.0000 | 1.0000 | 5.0000 | 4.0000 | 4.0000 | 4.0000 | 2 |
| 5 | 3.2000 | 1.0000 | 5.0000 | 4.0000 | 4.0000 | 5.0000 | 2 |
| 6 | 3.4000 | 1.0000 | 6.0000 | 5.0000 | 4.0000 | 1.0000 | 2 |
| 8 | 3.8000 | 1.0000 | 8.0000 | 7.0000 | 4.0000 | 1.0000 | 2 |
| 9 | 4.0000 | 1.0000 | 9.0000 | 8.0000 | 4.0000 | 1.0000 | 2 |
| 10 | 4.2000 | 1.0000 | 10.0000 | 9.0000 | 4.0000 | 1.0000 | 2 |
How each result changes as value 1 changes, holding the other inputs constant.
Practice Problems
1. [3, 1, 4, 1, 5]: You enter Value 1 3, Value 2 1, Value 3 4, Value 4 1, Value 5 5 — what does the calculator return?
Answer: Entering Value 1 3, Value 2 1, Value 3 4, Value 4 1, Value 5 5 gives Mean 2.8000, Minimum 1.0000, Maximum 5.0000, Range 4.0000, Median 3.0000, and 2 more more results.
2. With Value 1 106.25, Value 2 92, Value 3 78, Value 4 90, Value 5 88, what are the results?
Answer: The calculator returns Mean 90.8500, Minimum 78.0000, Maximum 106.2500, Range 28.2500, Median 90.0000, and 1 more more results for Value 1 106.25, Value 2 92, Value 3 78, Value 4 90, Value 5 88.
Frequently Asked Questions
What is the formula for median?
The formula is: Middle value when sorted. Find the median value of a sorted or unsorted dataset.
What values do I need to calculate median?
You need value 1, value 2, value 3, value 4, value 5. The calculator produces mean, minimum, maximum, range, median, mode, mode frequency from those inputs.
What is the median when value 1 is 2?
With value 1 = 2, the result is mean = 2.6000, minimum = 1.0000, maximum = 5.0000, range = 4.0000, median = 2.0000, mode = 1.0000, mode frequency = 2. This is worked through in full in the example on this page.
Related Topics
Use the Interactive Calculator
Skip the manual math — get instant results with our free Median calculator.
