What Is an Interquartile Range? (Formula & Stats Rules)

The interquartile range (IQR) measures the spread of the middle 50% of a set of ordered values. Its formula is IQR = Q3 − Q1, where Q1 is the first quartile and Q3 is the third. To calculate it, sort the data, find both quartiles using a stated method, then subtract.

When a statistics problem asks for the spread of data, the range and the IQR may give very different answers. The range uses the smallest and largest values, so one unusually high or low observation can change it a lot. The IQR focuses on the center of the data instead.

I often see students get the subtraction right but receive a different answer from a calculator or textbook. The reason is usually not a math error: quartile methods can differ, especially for small datasets. Naming the method helps you explain your result and compare it fairly.

IQR Overview: Definition, Formula, and Quartile Conventions

The IQR is a measure of spread. It tells you how far apart the first and third quartiles are, and so describes the middle half of the ordered data. The formula is IQR = Q3 − Q1. Quartile values can depend on the method used, so check your course or software instructions.

Quartiles divide ordered data into four parts. Q1, the first quartile, marks the point at or below which about 25% of the observations fall. Q3, the third quartile, marks the point at or below which about 75% fall. The IQR is the distance between those two values.

For example, if Q1 is 12 and Q3 is 20, then:

IQR = 20 − 12 = 8

The middle 50% of the data spans 8 units. The IQR uses the same units as the original values. If the data are in minutes, the IQR is in minutes; if they are in dollars, it is in dollars. The IQR cannot be negative because Q3 is at least as large as Q1.

Why quartile methods matter

There is no single quartile method used by every class, calculator, and software program. One common approach finds the median of the lower half and the median of the upper half. Another approach uses percentile positions and may interpolate between two observations. For small datasets, these methods can return different quartiles and different IQRs.

Follow the method your teacher, textbook, or software specifies. If you are reporting a result outside a class exercise, name the method when it could affect the answer. That way, another person can repeat your calculation.

Calculation Rules: Ordering Data, Finding Quartiles, and Computing the IQR

To calculate the IQR, first arrange all included observations from least to greatest. Then find Q1 and Q3 using the required quartile method, and subtract Q1 from Q3. Keep the data units clear, and check how your instructions treat an odd number of observations and missing values.

Consider these eight values: 2, 4, 5, 7, 8, 10, 12, 15.

Using the median-of-halves method:

  • The lower half is 2, 4, 5, 7. Its median is (4 + 5) ÷ 2 = 4.5, so Q1 = 4.5.
  • The upper half is 8, 10, 12, 15. Its median is (10 + 12) ÷ 2 = 11, so Q3 = 11.
  • IQR = 11 − 4.5 = 6.5.

The middle half of these values stretches across 6.5 units. Notice that the dataset has an even number of observations, so each half contains four values. To find each half’s median, average its two middle values.

For an odd number of observations, instructions may differ on whether to include the overall median in each half. Follow the convention given in your course or software rather than choosing one without checking.

Step What to do Example
1. Sort Arrange values from least to greatest 2, 4, 5, 7, 8, 10, 12, 15
2. Find Q1 Locate the first quartile by the required method 4.5
3. Find Q3 Locate the third quartile by the required method 11
4. Subtract Calculate Q3 − Q1 11 − 4.5 = 6.5
5. Report State the IQR, units, and method if needed IQR = 6.5 units, median-of-halves method

Check your result

Before you submit or share an IQR, ask yourself:

  • Did I sort the values before finding the quartiles?
  • Did I use the specified quartile method?
  • Did I subtract Q1 from Q3, not the other way around?
  • Did I keep the units and state the method if results might vary?

These checks can catch common errors without changing the underlying data.

Statistical Interpretation: Boxplots, Outlier Fences, and Common Errors

The IQR describes spread in the center of a dataset, not the distance from the smallest value to the largest. A boxplot shows Q1 and Q3 at the edges of its box, with the median inside. The IQR is the box’s width or length, depending on the plot’s orientation.

The standard 1.5-IQR rule uses the quartiles to flag values that may be outliers. Calculate the lower and upper fences as follows:

  • Lower fence = Q1 − 1.5 × IQR
  • Upper fence = Q3 + 1.5 × IQR

Values below the lower fence or above the upper fence are potential outliers. They are not automatically mistakes, and the fences are not limits that data must stay within. Check a flagged value against the original record and the context before deciding what it means.

For the eight-value example, Q1 = 4.5, Q3 = 11, and IQR = 6.5:

  • Lower fence = 4.5 − (1.5 × 6.5) = −5.25
  • Upper fence = 11 + (1.5 × 6.5) = 20.75

All eight observations fall between the fences, so none are flagged by this rule.

Measure or rule What it describes Main limitation
Range Largest value minus smallest value Can change sharply due to one extreme value
IQR Spread between Q1 and Q3 Does not describe the full spread or explain its cause
1.5-IQR fences A rule for flagging potential outliers A flag is a prompt to investigate, not proof of an error

A common mistake is to delete a value simply because it falls outside a fence. Instead, check for a recording or measurement error, then consider whether the value is plausible in the setting. A real but unusual observation may be important and should not be removed just to make the data look more regular.

Another mistake is to say the IQR gives the exact spread of every observation in the middle 50%. It gives the distance between the quartile cut points. It does not show every value’s position or describe patterns within that interval.

Practical Applications: Comparing Spread and Reporting Results

The IQR is useful when you want to compare how much the central values vary, especially when a few extreme observations could distort the range. Compare IQRs only with attention to units, context, and quartile method. A larger IQR means a wider middle half, but it does not tell you why that group varies.

Worked scenarios

These examples are illustrative calculations, not reports from a specific study.

Comparing two groups: Suppose two classes have the same median test score, but Class A has an IQR of 8 points and Class B has an IQR of 15 points. Their center scores match, but the middle half of Class B’s scores is more spread out. The IQR alone does not show which class has the higher maximum or a more unusual score.

Checking an unusually high value: Suppose a set of delivery times has Q1 = 20 minutes and Q3 = 32 minutes. The IQR is 12 minutes, and the upper fence is 32 + (1.5 × 12) = 50 minutes. A recorded time of 58 minutes lies beyond that fence. Check the record and the circumstances before deciding whether it is an error or a genuine delay.

Reporting a result: A clear report might say: “Using the median-of-halves method, Q1 was 4.5, Q3 was 11, and the IQR was 6.5 units. The 1.5-IQR fences ranged from −5.25 to 20.75; no observations were flagged.” Include only the parts that matter to your question.

A good final report states the quartile method when relevant, gives the IQR and its units, and explains any outlier screening. If you use a boxplot, make sure the values and method match the calculation you report.

Conclusion and FAQ

The IQR is the difference between the third and first quartiles, and it measures the spread of the middle 50% of ordered data. Sort the values, use the required quartile convention, and calculate Q3 − Q1. If you apply the 1.5-IQR rule, treat flagged values as points to check, not errors to remove automatically.

What does IQR stand for?
IQR stands for interquartile range. It measures the distance between the first quartile, Q1, and the third quartile, Q3.

What is the IQR formula?
The formula is IQR = Q3 − Q1. Subtract the first quartile from the third quartile.

What does the IQR tell you?
The IQR describes the spread of the middle 50% of ordered observations. It does not describe the full range or explain why values vary.

Can the IQR be negative?
No. Q3 is at least as large as Q1, so Q3 − Q1 is zero or positive.

Why do calculators give different IQR answers?
Calculators and software may use different quartile methods. Check the settings or instructions, especially for a small dataset, and state the method when it matters.

What is the 1.5-IQR outlier rule?
It sets a lower fence at Q1 − 1.5 × IQR and an upper fence at Q3 + 1.5 × IQR. Values beyond either fence are potential outliers.

Should I remove a value outside an IQR fence?
Not automatically. Check whether the value was recorded correctly and whether it makes sense in context. A flagged value may be a genuine observation.

Is IQR better than range?
Neither measure is always better. The range uses the smallest and largest values, while the IQR focuses on the middle half and is less affected by extreme values.

What happens if Q1 equals Q3?
The IQR is zero, which means the first and third quartiles are equal. It does not always mean every observation is identical.

How should I report an IQR?
Give the IQR with its units. If the quartile method could change the result, name the method and explain any outlier check you performed.

(This article was written by one of our staff writers, Nathan Sterling. Visit our Meet the Team page.)

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *