Median Calculator
Find the median, quartiles (Q1, Q3) and interquartile range of a data set, with the sorted values.
Your inputs
Results
Median
5
- First quartile (Q1)
- 2.5
- Third quartile (Q3)
- 8
- Interquartile range
- 5.5
- Sorted values
- 1, 2, 3, 5, 7, 9, 11
✓Exact calculation — rounded only for display
Notes for this result
- Quartiles use linear interpolation between ranks (the method used by spreadsheet PERCENTILE.INC). Other textbooks use slightly different conventions.
What this calculator does
The median is the middle value of sorted data. Quartiles split the data into four equal parts and the IQR measures spread of the middle half.
Formula and method
Median = middle value (or mean of the two middle values). Quartiles by linear interpolation: position = (n − 1) × p.
Worked example
Calculated by this tool with its default inputs:
Inputs
- Numbers (separated by commas, spaces or new lines): 7, 1, 3, 9, 5, 11, 2
Results
- Median: 5
- First quartile (Q1): 2.5
- Third quartile (Q3): 8
- Interquartile range: 5.5
- Sorted values: 1, 2, 3, 5, 7, 9, 11
How to read the results
The IQR is robust to outliers; values beyond 1.5 × IQR from the quartiles are often flagged as outliers.
Assumptions and limitations
- Quartile conventions differ between textbooks and software; this uses the PERCENTILE.INC method.
Questions
Why are my quartiles different from my textbook?
There are several accepted quartile definitions; small data sets show the differences most.
Methodology and verification
- Result type
- Exact mathematical calculation (rounded only for display)
- Formula version
- 1.0
- Automated verification
- 3 reference and validation test cases, checked against independently computed values. The site cannot be built if any of them fail.
- Editorial review
- Awaiting human editorial review. The explanation was drafted with AI assistance; the formula and examples are verified by the automated tests above.
Privacy
Everything you enter is calculated in this browser and is not sent to Numerith or anyone else. Inputs are added to a share link only if you choose to include them. Privacy policy