Median and Quartiles
Compute min, Q1, median, Q3 and max with linear interpolation.
Median and quartiles
Put the data in order and read off the value in the middle. That value is the median (Q2 = P50). The first quartile Q1 = P25 marks the bottom 25%, while the third quartile Q3 = P75 marks the top 25%. Take 1..9 as an example and you get Q1 = 3, median = 5, Q3 = 7. Most methods locate a value using the linear position k = (P/100)·(n+1), then interpolate between the neighboring points. Tukey (1977) gave us the five-number summary (min, Q1, Q2, Q3, max), which is what a boxplot draws. The reason people reach for it instead of the mean is robustness. The median barely flinches at outliers, so when Bill Gates walks into a bar, the median salary stays put.
Applications
Income distribution is the classic case, since the median lines up with the "typical" person better than a Brazilian mean that the top earners drag upward. You also see it in SRE latency reporting (P50/P95/P99), school grades, biometrics, salary surveys by role, and pretty much any skewed dataset where the mean would lead you astray.
FAQ
Median or mean — which to use? The mean takes every value into account, which is also why a few extremes can yank it around. The median just sits at the middle of the order. When a distribution is skewed, like income or prices, go with the median.
How is the median computed with an even n? There is no single middle value, so you average the two that share the center. Sort a set of n = 10 and the median is (x5 + x6) / 2.
Why do different software give different quartiles? Because there isn't one agreed definition. Hyndman & Fan (1996) counted at least nine ways to define a quantile, so Excel, R, and NumPy can each hand back a slightly different Q1/Q3 for the same numbers. The gap shrinks toward nothing as n grows.
Related Tools
Median Quartiles IQR Calculator
Computes median, first quartile Q1, third quartile Q3 and interquartile range IQR of a list of numerical values.
Basic Statistics Calculator
From a list of numbers, compute mean, median, mode, min, max, sum, standard deviation and variance (population and sample). Everything in your browser.
Percentile Calculator
Compute the percentile of a value in a sample, or the value at a given percentile (p25, p50/median, p75, p99). Everything in your browser.
Hodges-Lehmann Estimator
Computes the Hodges-Lehmann estimator of a sample's location, a robust alternative to both the mean and the median. It's defined as the median of all pairwise averages (the so-called Walsh averages) among the values, including each value with itself. The result combines the median's resistance to outliers with greater efficiency when the data are nearly normal. It's the estimator associated with the Wilcoxon signed-rank test. Enter the sample of values.
Mood's Median Test
Computes Mood's median test, a non-parametric test that checks whether several groups share the same median. The idea is simple and robust: you compute the grand median of all the data together and count, in each group, how many values fall above it. If the groups had the same median, those counts would be proportional to the sizes; an imbalance produces a large chi-square statistic. It's quite resistant to outliers, working only with counts. Enter the groups separated by semicolons.
Sign Test (Paired)
Computes the sign test, the simplest and most robust paired test of all. It completely ignores the magnitude of the differences between pairs and looks only at the sign: how many times the value went up and how many it went down. Under the hypothesis of no effect, ups and downs should balance out, like heads and tails, and the p-value comes straight from a binomial distribution. Because it uses so little information, it's less powerful than Wilcoxon, but it makes almost no assumptions. Enter the two paired series.
The results provided by this tool are for general informational and educational purposes only and do not constitute professional, financial, medical, legal, tax or accounting advice. Always confirm important decisions with a qualified professional and official sources.