Math

Median Calculator — Find Median, Quartiles & Data Range

Find the median, quartiles and range of a data set.

Last updated · View algorithm, constants and default inputs (JSON)

Enter your values

Median 12
Results

Numbers (separated by comma, semicolon or space)

Numbers (separated by comma, semicolon or space)3.00–10.33: 3 / 10.33–17.67: 2 / 17.67–25.00: 2Numbers (separated by comma, semicolon or space) / CountMedian: 12.003.00–10.33: 310.33–17.67: 2 · Median17.67–25.00: 2

About this calculator

The median is the middle value once the data is sorted, which makes it far more resistant to outliers than the mean. Housing prices and incomes are almost always reported as medians for exactly this reason.

Worked example

calculated with the default values below

Numbers (separated by comma, semicolon or space) 12, 7, 3, 19, 25, 8, 15 Median 12 · First quartile 7.5 · Third quartile 17 · Interquartile range 9.5 · Range 22

General background references

Disclaimer

These calculators give general mathematical results. They suit study, planning and estimation — verify anything that feeds a graded submission, a published figure or a financial commitment.

Maintained by: CalcDelta

Implementation source

This record describes the implementation used by this page. It is not independent validation. External references, when available, support only the stated formula or definition; estimates and custom rules retain their own assumptions.

View algorithm, constants and default inputs (JSON)

Formula and variables

Q(p) = x[⌊k⌋] + (x[⌈k⌉] − x[⌊k⌋])(k − ⌊k⌋), k = (n − 1)p; median = Q(0.5)

Q(p)
quantile at probability p
median
Q(0.5)
x
sorted values
n
value count
p
probability 0–1
k
position index, 0-based

Uses linear interpolation at positions (n−1)p for Q1, median and Q3. Empty fields, non-finite numbers and lists above 10,000 values are rejected.

Embed this calculator

Copy the iframe snippet to place this calculator on your site. No account required. The snippet stays in sync with the inputs currently shown.

Frequently asked questions

How are the quartiles calculated?

The values are sorted and quartiles use linear interpolation at positions (n−1)×0.25 and (n−1)×0.75. Other conventions, such as the median-of-halves method, can give different quartiles for the same short list.