CalcUnit Logo

How to Calculate Interquartile Range

Calculate the IQR and identify statistical outliers.

The Formula

IQR = Q3 - Q1

The interquartile range formula uses the mathematical relationship: IQR = Q3 - Q1. Each variable in the formula represents a measurable quantity that affects the final result.

What Each Variable Means

Every value in the interquartile range formula, what it measures, and the value used in the worked example on this page:

VariableTypeExample value
Q1 (25th percentile)Input (you provide)25
Q3 (75th percentile)Input (you provide)75
IQRResult (calculated)—
Lower FenceResult (calculated)—
Upper FenceResult (calculated)—
Midpoint (Q2 estimate)Result (calculated)—

Step-by-Step Method

  1. 1Write down the values you know: Q1 (25th percentile), Q3 (75th percentile).
  2. 2Substitute your known values into the formula: IQR = Q3 - Q1.
  3. 3Work through the arithmetic in the standard order of operations — parentheses first, then exponents, then multiplication and division, then addition and subtraction.
  4. 4Check that your result carries the correct unit and falls in a reasonable range for the problem.
  5. 5Verify your answer with the interactive Interquartile Range Calculator — it solves the same formula instantly.

Worked Example

Take a concrete case: q1 (25th percentile) = 10, with the other inputs at the typical values from the variables table above. Substituting into the formula gives iqr = 65.0000, lower fence = -87.5000, upper fence = 172.5000, midpoint (q2 estimate) = 42.5000. These numbers are solved by the same engine that powers the Interquartile Range calculator, so you can reproduce them exactly by entering the same inputs there.

Q1 (25th percentile)IQRLower FenceUpper FenceMidpoint (Q2 estimate)
669.0000-97.5000178.500040.5000
1065.0000-87.5000172.500042.5000
2055.0000-62.5000157.500047.5000
3045.0000-37.5000142.500052.5000
4035.0000-12.5000127.500057.5000
5025.000012.5000112.500062.5000
6015.000037.500097.500067.5000
80-5.000087.500067.500077.5000
100-25.0000137.500037.500087.5000

How each result changes as q1 (25th percentile) changes, holding the other inputs constant.

Practice Problems

1. Q1=25, Q3=75: With Q1 (25th percentile) 25, Q3 (75th percentile) 75, what are the results?

Answer: With Q1 (25th percentile) 25, Q3 (75th percentile) 75, the results are IQR 50.0000, Lower Fence -50.0000, Upper Fence 150.0000, Midpoint (Q2 estimate) 50.0000.

2. Q1 (25th percentile) 12.5, Q3 (75th percentile) 40 — work it out, then check the answer.

Answer: Entering Q1 (25th percentile) 12.5, Q3 (75th percentile) 40 gives IQR 27.5000, Lower Fence -28.7500, Upper Fence 81.2500, Midpoint (Q2 estimate) 26.2500.

Frequently Asked Questions

What is the formula for interquartile range?

The formula is: IQR = Q3 - Q1. Calculate the IQR and identify statistical outliers.

What values do I need to calculate interquartile range?

You need q1 (25th percentile), q3 (75th percentile). The calculator produces iqr, lower fence, upper fence, midpoint (q2 estimate) from those inputs.

What is the interquartile range when q1 (25th percentile) is 10?

With q1 (25th percentile) = 10, the result is iqr = 65.0000, lower fence = -87.5000, upper fence = 172.5000, midpoint (q2 estimate) = 42.5000. This is worked through in full in the example on this page.

Related Topics

iqrquartileoutlier

Use the Interactive Calculator

Skip the manual math — get instant results with our free Interquartile Range calculator.

Open Calculator

Related Calculators