The interquartile range (IQR) is the distance between the 25th percentile (Q1) and the 75th percentile (Q3) of a data set, so it measures the spread of the middle 50% of your numerical observations. Paste your numbers into this free tool, an IQR calculator (also called an interquartile range calculator) that works as a quartile calculator and a Q1 and Q3 calculator too. It computes Q1, the median, Q3 and the interquartile range with the working shown. Quartile method options let you match your textbook, TI-84, Excel or R, and the tool also calculates the five-number summary, the outlier fences for identifying outliers and a box plot.
Loading calculator…
What is the interquartile range (IQR)?
The interquartile range is a measure of dispersion: how far apart the values in an ordered data set are in the middle. Put the numbers in order, and the first quartile (Q1, the 25th percentile) marks the point with a quarter of the data below it, while the third quartile (Q3, the 75th percentile) marks the point with three quarters below it. The IQR is the difference between them. That is the interquartile range definition, and it is why people call it the middle half of a data set. The lower quartile, Q1, is the value with 25% of the data below it; the upper quartile, Q3, has 75% below it.
What is IQR in statistics, and what is interquartile range in math? It is the same idea in both: IQR stands for interquartile range (written inter quartile range in some books), and the IQR meaning (or interquartile range meaning) is the spread of the middle 50%. What is IQR in math is the same question as what does interquartile range mean. In IQR statistics and IQR stats classes the question comes in many forms, such as what does IQR mean, what is the IQR or what is an interquartile range, and the answer does not change.
Because it ignores the lowest quarter and the highest quarter, the IQR is robust to outliers and resistant to extremes, unlike the full range (maximum minus minimum). That is why it is paired with the median for skewed data, and why the box in a box plot runs from Q1 to Q3. What does the IQR tell you, or what does the interquartile range tell you? A small IQR tells you the central half of the data is tightly packed, and a large IQR tells you it is stretched over a wide range of values. It can never be negative, and it is measured in the same units as your data, so an IQR of 12 on exam scores is 12 points. The semi-interquartile range is simply half of it, (Q3 − Q1) / 2.
IQR formula
The interquartile range formula is one subtraction, so the IQR equation is short. The work is in finding the quartiles.
IQR = Q3 − Q1
IQR = Q3 − Q1, where Q1 is the lower quartile (also called the first quartile or 25th percentile) and Q3 is the upper quartile (third quartile, 75th percentile). Some books write it as IQR = xU − xL, with xU the upper quartile and xL the lower quartile; either way it is Q3 minus Q1. Q2, the second quartile, is the median. If Q1 = 16.5 and Q3 = 28, then IQR = 28 − 16.5 = 11.5.
How to use the IQR calculator
- Enter numbers in the text box: type or paste them, separated by commas (comma separated is fine), spaces, tabs or new lines, one per line if you like. A column copied from a spreadsheet pastes in as it is. You need 4 to 5,000 values, and the tool does the sorting for you.
- Choose a quartile method. The default, Halves with the median excluded, is the one most US textbooks and the TI-84 use. Pick another if your class or software uses it (see the methods section below).
- Press Calculate. Reset clears the box, and the example buttons fill in a data set for you.
- Read Q1, the median (Q2), Q3 and the IQR, then the five-number summary, the outlier fences, the table that compares all four methods, the working and the box plot.
- If a value is flagged outside the fences, check it before deciding what to do. Reviewing flagged values is the point of the fences, not deleting them.
The tool also prints Excel, Google Sheets, R, Python and TI-84 lines built from your numbers, and you can copy the result or download the box plot as a PNG.
How to find the interquartile range step by step
How do you find the interquartile range by hand? How do you find IQR, or how do you calculate IQR, for a list you have in front of you? How to find interquartile range values and how to calculate the IQR takes six steps. What is IQR of a data set? It is Q3 − Q1 for that list. How to calculate interquartile range by hand is the same for every data set. These are the steps for the default method, and the calculator shows the same working for whichever method you choose. If you are wondering how to get the interquartile range by hand, the steps below take under a minute; this interquartile calculator does the same sorting and splitting for you, so you can use it as a quick IQR finder.
- Sort the numbers from smallest to largest.
- Find the median (Q2), the middle value, or the mean of the two middle values when n is even.
- Split the list into a lower half and an upper half. With an odd n, leave the median out of both halves (the default method).
- Q1 is the median of the lower half, and Q3 is the median of the upper half.
- Subtract: IQR = Q3 − Q1.
- Optional: work out the fences, Q1 − 1.5 × IQR and Q3 + 1.5 × IQR, to find outliers.
That is how to calculate the interquartile range, how to do IQR, how to do interquartile range work, and how to find the IQR of a data set of any size. Take 12, 15, 18, 20, 22, 25, 31, 38. The list is already sorted and n = 8. The median is (20 + 22) / 2 = 21. The lower half is 12, 15, 18, 20, so Q1 = (15 + 18) / 2 = 16.5. The upper half is 22, 25, 31, 38, so Q3 = (25 + 31) / 2 = 28. The IQR is 28 − 16.5 = 11.5. Enter the same numbers in the calculator above and you get the same interquartile range calculation, and you can calculate interquartile range for any list of 4 to 5,000 values the same way.
Quartile methods: why Q1 and Q3 differ between calculators
There is no single rule for quartiles, so two calculators can give different Q1 and Q3 for the same data without either one making an arithmetic error. The difference is the quartile convention, and mismatched answers are common between tools. Several quartile conventions are in use, because percentiles can be defined in more than one way. Different tools agree more often as the data set grows, but with small datasets and odd-sized datasets the quartile values can move noticeably. This calculator lists four methods:
- Halves, median excluded: the median of each half, with the overall median left out when n is odd. The TI-83 and TI-84 and most US introductory textbooks use it.
- Halves, median included: with an odd n the median is placed in both halves. These are the Tukey hinges, and R’s fivenum() returns them.
- Inclusive: Excel QUARTILE.INC and PERCENTILE.INC, R type 7 (the default in quantile() and IQR()), Google Sheets and the default in NumPy. It interpolates at position 1 + p(n − 1).
- Exclusive: Excel QUARTILE.EXC and PERCENTILE.EXC, R type 6, and the choice in SPSS and Minitab. It interpolates at position p(n + 1).
The quartile.exc vs quartile.inc choice in Excel (the same as PERCENTILE.EXC vs PERCENTILE.INC) is the same choice as R type 6 vs type 7, and the median-of-halves methods are the ones taught by hand. For the eight numbers above the four methods give an IQR of 11.5, 11.5, 9.25 and 13.75. For the seven numbers 8, 11, 13, 17, 18, 24, 30, the exclusive and median-excluded methods give Q1 = 11 and Q3 = 24 (IQR 13), while the inclusive and median-included methods give Q1 = 12 and Q3 = 21 (IQR 9). If your answer does not match a classmate’s, a book’s answer key or another calculator, compare the quartile method first. Calculators disagree because of this convention, not because of the formula. The lower quartile meaning is simple: about 25% of the values fall at or below Q1.
| Method | Q1 | Q3 | IQR |
|---|---|---|---|
| Halves, median excluded (TI-84) | 16.5 | 28 | 11.5 |
| Halves, median included (Tukey hinges) | 16.5 | 28 | 11.5 |
| Inclusive (QUARTILE.INC, R type 7) | 17.25 | 26.5 | 9.25 |
| Exclusive (QUARTILE.EXC, R type 6) | 15.75 | 29.5 | 13.75 |

Worked examples
Example 1: the middle value matters. The seven numbers 8, 11, 13, 17, 18, 24, 30 have an odd count, so the median 17 is in the middle. With the median excluded, the lower half is 8, 11, 13 and the upper half is 18, 24, 30, so Q1 = 11, Q3 = 24 and IQR = 24 − 11 = 13. With the median included, the lower half is 8, 11, 13, 17, so Q1 = (11 + 13) / 2 = 12, the upper half is 17, 18, 24, 30, so Q3 = (18 + 24) / 2 = 21 and IQR = 21 − 12 = 9.
Example 2: a longer list. What is the IQR of 1 1 3 4 4 5 5 5 6 7 9? There are 11 values and the median is 5. With the median excluded, the lower half is 1, 1, 3, 4, 4 and the upper half is 5, 5, 6, 7, 9, so Q1 = 3, Q3 = 6 and the IQR is 3. With the inclusive method Q1 = 3.5 and Q3 = 5.5, so the IQR is 2. Either answer is correct for its method, so use the one your course expects.
Example 3: an outlier. The next section works out the fences for 14, 16, 17, 19, 20, 22, 23, 25, 90.
These interquartile range examples are all on the calculator’s example buttons or can be typed in, so you can check each step against the tool.
IQR outlier fences (1.5 × IQR rule)
The 1.5 × IQR rule, also called the 1.5 IQR rule or IQR method, is the usual way to find outliers with the IQR. The outlier formula gives two cut-offs. The lower fence is Q1 − 1.5 × IQR and the upper fence is Q3 + 1.5 × IQR, and together they are the lower and upper fence. A value strictly beyond a fence, below the lower fence or above the upper fence, is flagged for review. The calculator shows both fences and lists any flagged values, using the quartile method you selected. The upper fence formula is Q3 + 1.5 × IQR, and the lower fence is Q1 − 1.5 × IQR.
The fence values are cut-off points, not data values, and a flagged value is not automatically wrong or removed. It might be a typing error, a measurement problem or a real, unusual result, so check it before you decide anything. Is IQR affected by outliers? Very little. Is IQR resistant to outliers? Yes, which is why this rule works as a first screen. That is how to find outliers with IQR.
For 14, 16, 17, 19, 20, 22, 23, 25, 90 the median is 20, Q1 = 16.5 and Q3 = 24, so IQR = 7.5. The lower fence is 16.5 − 1.5 × 7.5 = 5.25 and the upper fence is 24 + 1.5 × 7.5 = 35.25. Nothing falls below 5.25, but 90 is above 35.25, so it is flagged. The other eight values, up to 25, are inside the fences. Notice how the IQR stayed small while the range jumped to 76 because of that one value.

IQR vs range vs standard deviation
All three are ways of measuring spread, and each answers a different question.
| Measure | Uses | Sensitive to extremes? |
|---|---|---|
| Range | Maximum and minimum only | Very |
| IQR | Q1 and Q3, the middle 50% | Little |
| Standard deviation | Every value, around the mean | Yes |
When to use IQR vs standard deviation: use the IQR with the median when the data are skewed or have outliers, and use the standard deviation calculator with the mean when the data are roughly symmetric. The variance is the standard deviation squared, so its units are squared as well. For a spread measure in the same units that is less sensitive to extremes than the standard deviation, see the mean absolute deviation calculator.
Is there an IQR calculator with mean and standard deviation, or an IQR calculator from mean and standard deviation? Not exactly. For data that follow a normal distribution the two are linked, because the IQR is about 1.349 standard deviations. A standard deviation of 15 then corresponds to an IQR of roughly 20.2. That is an approximation for normal distributions only, so how to find IQR with mean and standard deviation comes down to assuming normality, and it is better to use the raw numbers when you have them. The empirical rule calculator covers the normal distribution in more detail. Does IQR have units? Yes, the same units as the data, while the units of the variance are squared.
How the IQR relates to a box plot
In a box plot (or boxplot), the box runs from Q1 to Q3, so the interquartile range box plot width is the IQR, and the line inside the box is the median. The whiskers usually reach the most extreme observed values that are still inside the fences, and anything beyond a fence is drawn as a separate dot. The whiskers stop at observed values, not at the fence numbers themselves. How to find IQR of a box plot, or how to find the IQR of a box plot you are given: read Q1 at the left edge of the box and Q3 at the right edge, then subtract. The calculator draws this box plot for your data, with the IQR marked, so you can see the median line, the box edges and any flagged value at a glance.
Quartile calculator: find Q1, Q3 and the median
Searching for a quartile calculator, quartiles calculator, first quartile calculator, third quartile calculator or quartile finder? The same tool does that job. Enter a numerical data set and read the first quartile (Q1, the 25th percentile), the median (Q2) and the third quartile (Q3, the 75th percentile), which together with the minimum and maximum form the five-number summary. If you need a Q1 Q3 calculator or a Q1 and Q3 calculator, those are the same two numbers, shown with the median.
What is a quartile? A quartile is one of three points that split ordered data into four equal parts: Q1, the median and Q3. The lower quartile and the first quartile are the same thing, and so are the upper quartile and the third quartile. How to find quartiles, and how to calculate quartiles, by hand: use the median-of-halves steps above. That is how to find Q1 and Q3, how to find the lower quartile and how to find the upper quartile, or how to find quartile 1 and 3. Quantile vs quartile: a quantile is the general term for a cut point (such as a percentile), and a quartile is the quantile at 25%, 50% or 75%. Use the median and interquartile range together when you report skewed data.
How to find IQR in Excel, R, Python and a TI-84
The calculator prints these lines with your own numbers. In general:
- Excel: the interquartile range in Excel is =QUARTILE.INC(A1:A8,3)-QUARTILE.INC(A1:A8,1). That is also how to calculate IQR in Excel. How to find first quartile in Excel: =QUARTILE.INC(A1:A8,1). How to find third quartile in Excel: =QUARTILE.INC(A1:A8,3). Use QUARTILE.EXC for the exclusive method. Google Sheets uses =QUARTILE(A1:A8,3)-QUARTILE(A1:A8,1).
- R: the interquartile range in R, or IQR in R, is IQR(x), which gives the type 7 IQR. For the exclusive method use diff(quantile(x, c(0.25, 0.75), type = 6)), and fivenum(x) for the Tukey hinges.
- Python: scipy.stats.iqr(x), or numpy.subtract(*numpy.percentile(x, [75, 25])).
- TI-84: how to find IQR on TI 84 (and how to find IQR on calculator in general): put the values in list L1 (STAT, then Edit). Next open STAT, CALC and run 1-Var Stats on L1. The second screen of results lists Q1 and Q3 along with the median, so subtract Q1 from Q3. The TI-84 uses the median-excluded method, so the IQR on a calculator matches this page’s default, and the same steps give IQR on calculator models from the TI-83 family.
Common mistakes
- Mixing methods: an answer from Excel will not match an answer key that uses the median of halves.
- Forgetting to sort before splitting the data into halves.
- Leaving the median in both halves when your course says to exclude it (or the other way round).
- Treating a flagged value as an error. The 1.5 × IQR rule only points to values worth checking.
- Calling the range the IQR. The range uses the extremes, and the IQR uses Q1 and Q3.
Sources and method references
Quartile definitions follow the standard references: the NIST e-Handbook of Statistical Methods on quartiles, outliers and box plots; the R documentation for quantile(), which defines types 6 and 7; Microsoft’s documentation for QUARTILE.INC and QUARTILE.EXC; and the NumPy documentation for numpy.percentile. See the Methodology page for how every calculator here is tested, and the Descriptive Statistics hub for the other calculators, including the mean, median and mode calculator.
IQR calculator FAQs
What is the IQR formula?
IQR = Q3 − Q1: the third quartile (75th percentile) minus the first quartile (25th percentile). It gives the spread of the middle 50% of the data.
How do you calculate an IQR?
How do you find the IQR? Sort the data, find the median, split the data into a lower and an upper half, take the median of each half to get Q1 and Q3, then subtract Q1 from Q3. The calculator above does all of this and shows the calculation steps.
How to get IQR on a calculator?
On a TI-84, store the numbers in list L1, run 1-Var Stats from the STAT CALC menu, and read Q1 and Q3 on the second screen. The IQR is Q3 − Q1. Or paste the numbers into the calculator on this page, which gives Q1, Q3 and the IQR in one step.
What is the IQR of 1 1 3 4 4 5 5 5 6 7 9?
With the median excluded (the textbook method) Q1 = 3 and Q3 = 6, so the IQR is 3. With Excel’s inclusive method, Q1 = 3.5 and Q3 = 5.5, so the IQR is 2.
Why do IQR calculators give different answers?
Quartiles have several accepted definitions. Some take the median of each half, and others interpolate between ordered values, like Excel’s QUARTILE.INC and QUARTILE.EXC. The differences are largest for small and odd-sized datasets, so match the method to your course or software.
How is IQR used to detect outliers?
Multiply the IQR by 1.5, subtract the result from Q1 for the lower fence, and add it to Q3 for the upper fence. Values outside the fences are flagged for review, not automatically removed.
Can the IQR be negative?
No. Q3 is never below Q1, so the IQR is 0 or more. It is 0 when more than half of the values are equal.
Is the IQR affected by outliers?
Very little. The IQR depends only on Q1 and Q3, so a few extreme values barely change it, while they can change the range and standard deviation a lot.
How does the IQR compare to the range and the five-number summary?
The range is the maximum minus the minimum. The IQR is Q3 minus Q1. The five-number summary lists the minimum, Q1, the median, Q3 and the maximum, so it contains both.
Can I find the IQR from the mean and standard deviation?
Not exactly. For roughly normal data the IQR is about 1.349 times the standard deviation, but real data rarely follow a normal distribution, so use the raw numbers when you have them.
What is the median and IQR?
They are a pair of summary numbers for skewed data: the median gives the center and the IQR gives the spread of the middle 50%. A median and IQR calculator, such as the one above, shows both.
How do I find the IQR in Excel?
Use =QUARTILE.INC(range,3)-QUARTILE.INC(range,1). Use QUARTILE.EXC for the exclusive method, or the median of halves by hand to match a textbook.
What is the difference between Q1 and the lower quartile?
Nothing. Q1, the first quartile, the lower quartile and the 25th percentile all name the same value, and Q3 is the upper quartile, third quartile or 75th percentile.
What is a good IQR?
There is no good or bad value. An IQR only makes sense next to the units and the typical size of your data, so compare it with the median or with another group measured the same way.
Easy Stat Calc · Results checked against Python, R and Excel formulas · Last updated November 24, 2026 · Methodology