What the interquartile range measures
The interquartile range (IQR) is a measure of statistical dispersion: it tells you how spread out the middle half of your data is. Formally, IQR = Q3 − Q1, where Q1 is the first quartile (the 25th percentile) and Q3 is the third quartile (the 75th percentile). Between those two cut points sit exactly the middle 50% of the observations, so the IQR is the width of that central block. In a box-and-whisker plot, the IQR is literally the length of the box.
Its defining virtue is robustness. Unlike the range (max − min) or the standard deviation, the IQR discards the bottom 25% and top 25% of the data, so a single wild value cannot inflate it. That is why the IQR is the preferred spread measure for skewed data such as incomes, house prices, or reaction times, where a few extreme observations would distort mean-based statistics.
How the quartiles are calculated
This calculator uses the linear-interpolation method, the same one Excel's QUARTILE.INC function and NumPy's default percentile use. The steps are:
- Sort the data from smallest to largest.
- For a percentile p (0.25 for Q1, 0.75 for Q3), compute the fractional position
pos = p × (n − 1), where n is the number of values and positions are 0-indexed. - If
poslands between two data points, interpolate:value = data[floor(pos)] + frac × (data[floor(pos)+1] − data[floor(pos)]).
Worked example. For the sorted set 7, 15, 36, 39, 40, 41, 42, 43, 47, 49 (n = 10): Q1 position = 0.25 × 9 = 2.25, giving 36 + 0.25 × (39 − 36) = 36.75. Q3 position = 0.75 × 9 = 6.75, giving 42 + 0.75 × (43 − 42) = 42.75. So IQR = 42.75 − 36.75 = 6, and the median is the average of the 5th and 6th values, (40 + 41)/2 = 40.5.
Note that different software sometimes reports slightly different quartiles because there are several accepted definitions (Tukey's hinges, the "exclusive" method used by Excel's QUARTILE.EXC, and others). They agree for large datasets and differ only in how they handle the endpoints of small samples.
Using the IQR to detect outliers
The most common outlier rule, introduced by John Tukey, uses "fences" built from the IQR:
- Lower fence: Q1 − 1.5 × IQR
- Upper fence: Q3 + 1.5 × IQR
Any value below the lower fence or above the upper fence is flagged as a (mild) outlier and drawn as an individual point beyond the whiskers of a box plot. Points beyond Q1 − 3×IQR or Q3 + 3×IQR are sometimes called extreme outliers. For the example above, the fences are 36.75 − 9 = 27.75 and 42.75 + 9 = 51.75, so the value 7 (and 15) fall below the lower fence and are flagged.
Frequently Asked Questions
What is the interquartile range in one sentence?
Why use the IQR instead of the standard deviation?
Why might my Q1 and Q3 differ from another tool?
Can the IQR be zero?
Common Tip Percentages
| Service | Typical Tip Range | Notes |
|---|---|---|
| Restaurant (sit-down) | 15–20% | 20%+ for exceptional service |
| Food delivery | 10–20% | Consider extra for long distances |
| Taxi / rideshare | 10–20% | More for assistance with luggage |
| Hotel housekeeping | $2–5/night | Leave daily, not just at checkout |
| Barber / hair salon | 15–20% | On pre-discount total |
| Pizza delivery | 10–15% or $3–5 minimum | Higher in bad weather |
General Household Budget Ratios (50/30/20 Rule)
| Category | % of Net Income | Examples |
|---|---|---|
| Needs | 50% | Rent, groceries, utilities, insurance |
| Wants | 30% | Dining out, entertainment, hobbies |
| Savings / Debt | 20% | Emergency fund, retirement, extra payments |
Common Measurement Conversions for Everyday Use
| Quantity | US / Imperial | Metric Equivalent |
|---|---|---|
| 1 cup | 8 fl oz | 237 mL |
| 1 pint | 16 fl oz | 473 mL |
| 1 quart | 32 fl oz | 946 mL |
| 1 gallon | 128 fl oz | 3.785 L |
| 1 lb | 16 oz | 453.6 g |
| 1 ft | 12 in | 30.48 cm |