Statistics

Interquartile Range Calculator

Paste your numbers and get the quartiles, the median, the IQR, and the fences that flag which values count as outliers.

Q1 (25th)
9.5
Median (Q2)
16
Q3 (75th)
24
Lower fence
-12.25
Upper fence
45.75
IQR
14.5

How it works

The tool sorts your numbers, then finds three cut points: Q1 (the 25th percentile), Q2 (the median, at 50%), and Q3 (the 75th percentile). Each is placed with linear interpolation on the sorted list.

The interquartile range is simply Q3 − Q1 — the spread of the middle half of the data. It ignores the extremes, so a stray giant or tiny value barely moves it, which is why it's a sturdy measure of spread.

Outlier fences come from the IQR. The lower fence is Q1 − 1.5×IQR and the upper fence is Q3 + 1.5×IQR. Anything beyond those is worth a closer look. For 4, 7, 9, 11, 12, 20, 21, 25, 30, 41 the IQR is about 14, putting the fences well outside the pack.

Frequently asked questions

Why use the IQR instead of the full range?

The full range is just max minus min, so a single extreme value can blow it up. The IQR looks only at the middle 50%, ignoring the tails, which makes it far more stable when your data has a few unusual points.

How does the 1.5 × IQR rule flag outliers?

It draws a fence 1.5 IQRs below Q1 and above Q3. Values outside that band are unusually far from the middle bunch, so they're treated as outliers. It's the same rule that draws the whiskers on a box plot.

What's the difference between Q2 and the median?

Nothing — they're the same number. Q2 is the second quartile, which splits the data in half, and that's exactly what the median does. The tool labels it both ways so it's clear where it sits among the quartiles.

How many numbers do I need?

At least two, so there's actually a spread to measure. With very short lists the quartiles can land close together, but the math still works. Larger datasets give more meaningful quartiles and fences.