SOLVETUTORMATH SOLVER

Instrument MI-07-088 · Statistics

IQR Calculator — Interquartile Range

The interquartile range measures the spread of just the middle half of your data, ignoring the extreme quarter at each end — which makes it the spread statistic outliers can't distort.

Instrument MI-07-088
Sheet 1 OF 1
Rev A
Verified
Type 07 — Descriptive Statistics SER. 2026-07088

Interquartile range (IQR)

1.5000

IQR = Q3 - Q1

4.0000 Q1 (25th pctile)
5.5000 Q3 (75th pctile)
The working Every figure verified twice
  1. iqrV = percentile([8 values], 75) − percentile([8 values], 25) = 1.5000
  2. q1 = percentile([8 values], 25) = 4.0000
  3. q3 = percentile([8 values], 75) = 5.5000
Worksheet log
  1. No entries yet — change an input to log a scenario.

How this instrument works

The interquartile range starts by cutting a sorted data set into quarters. Q1, the first quartile, is the value below which the lowest 25% of the data falls. Q3, the third quartile, is the value below which the lowest 75% falls. The interquartile range, IQR, is simply the distance between them: Q3 minus Q1 — the width of the middle 50% of the data, with the bottom and top quarters trimmed away.

That trimming is what makes the IQR genuinely useful as a spread statistic. The plain range collapses to whatever the single largest and smallest values happen to be, so one freakishly high or low reading can inflate it dramatically. The IQR ignores the top and bottom quarters entirely, so it stays stable even when a data set has a few extreme outliers sitting beyond it — which is also exactly why it's the standard basis for outlier detection: values sitting more than 1.5×IQR beyond Q1 or Q3 are conventionally flagged as candidates for further scrutiny.

There is more than one accepted way to compute a quartile from a finite list of numbers, and different textbooks and software genuinely disagree on the details. This instrument uses linear interpolation between the closest ranks — the same method behind the PERCENTILE.INC function in Excel and used throughout NIST's statistical guidance — so Q1 and Q3 here will sometimes differ slightly from a value computed by a textbook using a different convention. Neither is wrong; they are different, clearly defined rules, and this page states which one it applies.

Q1=P25,Q3=P75Q_1 = P_{25}, \quad Q_3 = P_{75}IQR=Q3Q1\text{IQR} = Q_3 - Q_1
Q1, Q3 — the first and third quartiles, found by linear interpolation between closest ranks (rank = p⁄100 × (n − 1)), the NIST/Excel PERCENTILE.INC convention · n — the count of values · IQR — the width of the middle 50% of the sorted data.
  • Enter your numbers into Data set — separate them with commas, spaces or new lines in any order.
  • Read Q1 (25th pctile) and Q3 (75th pctile) for the individual cut points, or read Interquartile range (IQR) directly for their difference.
  • Only need one of the two quartiles rather than the gap between them? This site's First quartile and Third quartile instruments report each on its own.
  • Building box-plot whiskers or screening for outliers by hand? This site's Upper fence, Lower fence and Outlier instruments apply the 1.5×IQR rule to the figure this page computes.
  • Enter at least two numbers; quartiles need a sorted list with more than one value to interpolate between.

Worked example — the eight quiz scores

Enter 2, 4, 4, 4, 5, 5, 7, 9 into Data set. Sorted, that's [2, 4, 4, 4, 5, 5, 7, 9], n = 8. For Q1, the rank formula gives 0.25 × (8 − 1) = 1.75, which sits between the 2nd and 3rd sorted values (index 1 and 2, both 4), so Q1 (25th pctile) reads 4.0 exactly — no interpolation needed since both flanking values are equal.

For Q3, the rank is 0.75 × (8 − 1) = 5.25, between the 6th and 7th sorted values, 5 and 7. Interpolating 25% of the way from 5 toward 7 gives 5 + 0.25×(7−5) = 5.5, so Q3 (75th pctile) reads 5.5. Interquartile range (IQR) is then 5.5 − 4.0 = 1.5 — a far tighter figure than this same data set's plain range of 7, because the IQR ignores the low score of 2 and the high score of 9 that the range is built entirely around.

Questions

How is the IQR different from the range?

The range is the maximum value minus the minimum, so it's defined entirely by the two most extreme points in the data set. The IQR is Q3 minus Q1, the width of just the middle 50%, so the most extreme quarter at each end is trimmed away before the spread is measured. On the eight-score example on this page, the range is 7 but the IQR is only 1.5 — a large gap that shows how much the extremes were driving the range.

How is IQR used to detect outliers?

The conventional rule flags any value more than 1.5×IQR below Q1 or above Q3 as a potential outlier — the same 1.5×IQR boundaries that box plots draw as whiskers. This site's Lower fence, Upper fence and Outlier instruments apply that rule directly to the Q1, Q3 and IQR figures this page computes, so you don't need to do the multiplication and addition by hand.

If I only need Q1 or only Q3, is there a simpler tool?

Yes — this site's First quartile and Third quartile instruments report exactly one of those two cut points on its own, without also computing the gap between them. Use this IQR instrument when you want the spread itself, or when you want both quartiles together; use the single-quartile instruments when only one cut point matters to your question.

Why did my textbook give a different Q1 or Q3 for the same data?

There are at least nine published methods for computing quartiles from a finite list, and they can disagree by a fraction of a unit on the same data. This instrument uses linear interpolation between closest ranks, the method behind Excel's PERCENTILE.INC and widely used in NIST statistical guidance. If your textbook uses a different rule, its answer isn't wrong — it's a different, equally valid convention, just not this one.

Does the IQR use every value in my data set?

Indirectly, in locating Q1 and Q3, but not in the final subtraction — once the two quartiles are found, the IQR is just their difference and the values inside or outside the middle 50% no longer individually matter. That's what makes it resistant to outliers: an extreme value can shift Q1 or Q3 only slightly, if at all, and has no direct effect on the subtraction itself.

Can the IQR be zero?

Yes, if at least half of your data is packed into a single repeated value that spans both the Q1 and Q3 positions — for example, a data set where the middle 50% of sorted values are all identical. A zero IQR signals an unusually concentrated middle of the distribution, whatever shape the tails take.

References