Interquartile Range Calculator
What is the Interquartile Range Calculator?
What this page computes
This page takes two numbers, the first quartile Q1 and the third quartile Q3, and returns four figures: the interquartile range, a Lower Fence, an Upper Fence, and a Midpoint. It is a small, exact piece of arithmetic, provided you arrive carrying the right two inputs.
The headline gap: it never sees your data
There are no data fields on this form at all. The summary speaks of working from sorted values, but no value can be entered. Your quartiles must be computed somewhere else first, by the hand method below or another tool, and typed into the two quartile boxes.
What the inputs really are
The boxes are labeled Q1 (25th percentile) and Q3 (75th percentile), prefilled with 25 and 75. Q1 is the value below which a quarter of a data set falls, and Q3 the value below which three quarters fall. Everything on the page flows from those two numbers alone.
The defaults worked end to end
With Q1 of 25 and Q3 of 75, the IQR is 50, the Lower Fence is −50, the Upper Fence is 150, and the Midpoint is 50. Those four lines are the complete output, and each one is a simple combination of the two inputs.
What the IQR measures
The interquartile range is the width of the middle half of a data set, from its first quartile to its third. Because it ignores the top and bottom quarters entirely, extreme values cannot stretch it. It is the standard spread measure to pair with a median.
Getting quartiles by hand
Sort the data and find the median. Split the data at the median: the median of the lower half is Q1 and the median of the upper half is Q3. For the values 10, 20, 30, 40, and 90, the median is 30, the lower half gives Q1 15, and the upper half Q3 65.
That data set, run through the page
Enter Q1 of 15 and Q3 of 65 and the page returns an IQR of 50, a Lower Fence of −60, an Upper Fence of 140, and a Midpoint of 40. Hold those numbers against the data set they came from as you read on, because two of them need careful handling.
The Midpoint is not the median
The output labeled Midpoint (Q2 estimate) is the average of Q1 and Q3, a statistic properly called the midhinge. For the worked data set it prints 40, while the actual median is 30. It matches the median only when the middle half of the data is symmetric. Never report it as the median.
What the fences are for
The fences apply Tukey's outlier rule: a data value counts as an outlier if it falls below the Lower Fence or above the Upper Fence. The fences are set one and a half IQRs beyond the quartiles. This page hands you the boundaries and nothing more.
You do the flagging yourself
Since the page never sees your data, it cannot list outliers. Compare each actual value against the two fences yourself. In the worked set, the value 90 looks extreme, yet it sits below the Upper Fence of 140, so the rule does not flag it. Fences, not eyeballs, decide.
The second built-in example
With Q1 of 10 and Q3 of 40, the IQR is 30, the Lower Fence is −35, the Upper Fence is 85, and the Midpoint is 25. A compact middle half, thirty units wide, centered on its midhinge of 25.
Exam scores, fences and all
A class with Q1 62 and Q3 of 84 has an IQR of 22, fences of 29 and 117, and a Midpoint of 73. The Upper Fence of 117 sits above the maximum score of 100, which means no score can be a high outlier in this class. Fences are allowed to be impossible values.
Negative fences are normal
The defaults produce a Lower Fence of −50, and the worked set gives −60. For data that cannot go negative, like scores or prices, a negative fence just means no low outliers can exist. The fence is an arithmetic boundary, not a value anyone expects to observe.
Adult heights, a realistic screen
For heights with Q1 of 64 inches and Q3 of 71 inches, the IQR is 7, the fences are 53. 5 and 81. 5, and the Midpoint is 67. 5 inches. Anyone outside those fences would be flagged by the rule, which in practice means the rule stays quiet for almost every adult measured.
Why the multiplier is 1.5
The 1. 5 is Tukey's convention, chosen so fences land outside ordinary variation. For bell-shaped data the fences sit near 2. 7 standard deviations out, and about 0. 7 percent of values fall beyond them. Treat it as a screening convention, not a law of nature; some fields use 3 for far outliers.
Quartile methods differ, so inputs differ
Textbooks and software use several percentile conventions, and they can hand you slightly different quartiles for the same data. The arithmetic on this page is exact once Q1 and Q3 are chosen. If your IQR disagrees with a classmate's, the disagreement lives in the quartiles you each brought, not here.
IQR versus range
The range spans the two most extreme values and flinches at every outlier. The IQR spans the middle half and ignores the extremes completely. Reported together they describe both the total span and the typical span, which is why the five-number summary carries the median, the quartiles, and the extremes.
The five-number summary connection
A five-number summary lists the minimum, Q1, the median, Q3, and the maximum. This page covers the fence arithmetic that grows out of the summary's middle. Bring the quartiles from a summary you trust, and the page finishes the outlier boundaries in one step.
A symmetry check you get for free
Compare the Midpoint with a median you already know. If the two sit close, the middle half of your data is roughly symmetric. A wide gap, like the 40 midpoint against a median of 30 in the worked set, warns that even the middle of the distribution leans to one side.
When the IQR is zero
Enter Q1 and Q3 both equal to 50 and the IQR is 0, both fences are 50, and the Midpoint is 50. Half of the data set sits on a single value, so there is no middle spread at all, and any value different from 50 falls outside the fences by construction.
Swapped inputs go unchallenged
The page does not check that Q3 exceeds Q1. Enter 75 as Q1 and 25 as Q3 and it dutifully returns an IQR of −50 with inverted fences of 150 and −50. A negative IQR is meaningless; it is your signal that the quartiles went into the wrong boxes.
How results are displayed
Every output is carried to four decimal places, with trailing zeros trimmed on screen. A fence of 53. 5 prints as 53. 5 rather than 53. 5000, and a whole-number IQR prints with no decimals at all. Nothing about the display changes the underlying arithmetic.
Units flow through
The fences and the IQR inherit the units of your quartiles: inches in, inches out; dollars in, dollars out. Mixing quartile units, one from a data set in centimeters and one in inches, produces fences in no unit at all. Bring both quartiles from the same summary.
What this page cannot do
It cannot compute quartiles from raw data, cannot flag your outliers, and cannot draw the box plot these numbers usually feed. It is the middle step of a workflow: quartiles in, fences out. Steps one and three, finding quartiles and judging values, remain yours.
Who this page suits
Students checking box plot homework, analysts screening a data set whose quartiles they already have, and anyone who wants Tukey fences without redoing the arithmetic. Arrive with trustworthy quartiles and it serves you well. Arrive expecting it to digest raw data, and it cannot begin.
Widen Q3 and watch the fences move
Hold Q1 at 40 and let Q3 climb through 60, 70, 90, and 120. The IQR grows 20, 30, 50, then 80. The fences move with it: 10 to 90, minus 5 to 115, minus 35 to 165, and minus 80 to 240. The Midpoint climbs 50, 55, 65, then 80.
Each 10 point rise in Q3 widens the IQR by 10 and pushes each fence 15 out. The fence span stays four times the IQR throughout.
House prices with a wide middle half
A neighborhood has Q1 of 280,000 dollars and Q3 of 410,000 dollars. The IQR is 130,000 dollars, the fences are 85,000 and 605,000 dollars, and the Midpoint is 345,000 dollars. A sale at 650,000 dollars sits above the Upper Fence, so the rule flags it as an outlier.
A sale at 120,000 dollars sits inside the fences and is not flagged. Flagged means worth a second look, not wrong: the house may simply be larger.
Delivery times and one slow order
A restaurant reports Q1 of 18 minutes and Q3 of 34 minutes for delivery times. The IQR is 16 minutes, the Lower Fence is minus 6 minutes, the Upper Fence is 58 minutes, and the Midpoint is 26 minutes. A 62 minute delivery falls above the Upper Fence, so the rule flags it. A 45 minute delivery does not.
The Lower Fence sits below zero, which only means no delivery can be a low outlier.
IQR or standard deviation, which spread
The IQR reads only the middle half and ignores the top and bottom quarters completely, so one extreme value cannot move it. The standard deviation uses every value, so that same extreme value pulls it. Pair the IQR with the median and the standard deviation with the mean.
For skewed data such as incomes or house prices, the IQR is the safer spread. For roughly symmetric data, the standard deviation carries more detail about the shape.
Far outliers use a wider fence
Some fields use 3 times the IQR instead of 1. 5 for far outliers, values so extreme they deserve a stronger label. With the house price quartiles, the far fences sit at minus 110,000 dollars and 800,000 dollars. Only a sale above 800,000 dollars counts as far out.
The 650,000 dollar sale is an ordinary outlier but not a far one. Two fences give two levels of surprise: outside the first fence is unusual, and outside the second is extreme.
Where to go next
To find quartiles from raw values, try quartile-calculator. For the value below which a given share of the data falls, try percentile-calculator. To measure spread around the mean, try standard-deviation-calculator. To screen a full data set for outliers, try outlier-calculator.
With the pre-filled defaults — Q1 (25th percentile) 25, Q3 (75th percentile) 75 — the Interquartile Range Calculator returns IQR 50. 0000, Lower Fence -50. 0000, Upper Fence 150. 0000, Midpoint (Q2 estimate) 50. 0000. Change any input and those results update instantly, so you can see exactly how each number you enter moves the answer.
How to Use the Interquartile Range Calculator
- 1Get Q1 and Q3 for your data first, using the hand method in the notes or another tool; this page accepts no raw data.
- 2Enter the first quartile in the Q1 (25th percentile) box, replacing the default 25.
- 3Enter the third quartile in the Q3 (75th percentile) box, replacing the default 75, and confirm Q3 is larger than Q1.
- 4Read the IQR line: Q3 minus Q1, the width of the middle half of your data.
- 5Read the Lower Fence and Upper Fence lines, set one and a half IQRs beyond the quartiles.
- 6Compare each of your actual data values against the two fences yourself; the page never sees your data.
- 7Treat any value outside the fences as an outlier under the 1.5 times IQR rule.
- 8Read the Midpoint line only as the midhinge, an average of the quartiles; never report it as the median.
Formula
This is the core equation the Interquartile Range Calculator uses to calculate results. Enter values in the calculator above to see it in action.
See the full step-by-step formula guide with worked examples →
Common Examples
| Scenario | Calculation | Result |
|---|---|---|
| The prefilled quartiles | IQR = 75 − 25 = 50; lower fence 25 − 1.5 × 50 = −50; upper fence 75 + 1.5 × 50 = 150; midpoint (25 + 75) / 2 = 50 | IQR 50, Lower Fence −50, Upper Fence 150, Midpoint 50 |
| A compact middle half | IQR = 40 − 10 = 30; lower fence 10 − 45 = −35; upper fence 40 + 45 = 85; midpoint (10 + 40) / 2 = 25 | IQR 30, Lower Fence −35, Upper Fence 85, Midpoint 25 |
| Exam score quartiles | IQR = 84 − 62 = 22; lower fence 62 − 33 = 29; upper fence 84 + 33 = 117; midpoint (62 + 84) / 2 = 73 | IQR 22, Lower Fence 29, Upper Fence 117, Midpoint 73 — the upper fence sits above the 100-point maximum |
| Quartiles from a real data set | From the data 10, 20, 30, 40, 90, hand quartiles are Q1 = 15 and Q3 = 65; IQR = 50; fences 15 − 75 = −60 and 65 + 75 = 140; midpoint (15 + 65) / 2 = 40 | IQR 50, Lower Fence −60, Upper Fence 140, Midpoint 40 — while the data set's actual median is 30 |
| Adult height quartiles in inches | IQR = 71 − 64 = 7; lower fence 64 − 10.5 = 53.5; upper fence 71 + 10.5 = 81.5; midpoint (64 + 71) / 2 = 67.5 | IQR 7, Lower Fence 53.5, Upper Fence 81.5, Midpoint 67.5 |
Value Reference Table
See how the IQR changes as Q1 (25th percentile) moves across its typical range — every row below is calculated live with the same formula as the calculator above.
| Q1 (25th percentile) | IQR | Lower Fence | Upper Fence | Midpoint (Q2 estimate) |
|---|---|---|---|---|
| 6 | 69.0000 | -97.5000 | 178.5000 | 40.5000 |
| 10 | 65.0000 | -87.5000 | 172.5000 | 42.5000 |
| 20 | 55.0000 | -62.5000 | 157.5000 | 47.5000 |
| 30 | 45.0000 | -37.5000 | 142.5000 | 52.5000 |
| 40 | 35.0000 | -12.5000 | 127.5000 | 57.5000 |
| 50 | 25.0000 | 12.5000 | 112.5000 | 62.5000 |
| 60 | 15.0000 | 37.5000 | 97.5000 | 67.5000 |
| 80 | -5.0000 | 87.5000 | 67.5000 | 77.5000 |
| 100 | -25.0000 | 137.5000 | 37.5000 | 87.5000 |
Practice Problems
Check your understanding of the Interquartile Range Calculator with these practice problems. Click a problem to reveal its correct calculated answer.
Q1=25, Q3=75: With Q1 (25th percentile) 25, Q3 (75th percentile) 75, what are the results?
Show AnswerHide Answer
Q1 (25th percentile) 12.5, Q3 (75th percentile) 40 — work it out, then check the answer.
Show AnswerHide Answer
Calculation Progression Roadmap
How the Interquartile Range Calculator turns your inputs into a result, step by step — from the values you type to the answer you read.
Gather your inputs
Type in your Q1 (25th percentile) and Q3 (75th percentile). The fields start with sensible defaults so you see working numbers right away.
Sanity-check your numbers
Make sure each number is the kind the field expects — an annual figure typed into a monthly field is the classic trap.
The math runs itself
The calculator evaluates Q3 (75th percentile) - Q1 (25th percentile) on every keystroke — there is no submit button to press.
Read your results
Your IQR, Lower Fence, Upper Fence, and Midpoint (Q2 estimate) appear instantly. With the pre-filled defaults, that is IQR 50.0000, Lower Fence -50.0000, Upper Fence 150.0000, Midpoint (Q2 estimate) 50.0000. Change any input to see the effect immediately.
Test a what-if
Nudge one input up or down. Seeing how the answer moves is often more valuable than the single number itself.
Real-World Examples
Fresh scenarios — starting with quick data overview — worked through with different numbers than the examples above, so you can watch the formula handle new situations.
Quick data overview
With Q1 (25th percentile) 50, Q3 (75th percentile) 75, the calculator returns IQR 25.0000, Lower Fence 12.5000, Upper Fence 112.5000, Midpoint (Q2 estimate) 62.5000.
Experiment results
Plug in Q1 (25th percentile) 12.5, Q3 (75th percentile) 75 and you get IQR 62.5000, Lower Fence -81.2500, Upper Fence 168.7500, Midpoint (Q2 estimate) 43.7500.
Class project
Enter Q1 (25th percentile) 37.5, Q3 (75th percentile) 75 — the answer comes out to IQR 37.5000, Lower Fence -18.7500, Upper Fence 131.2500, Midpoint (Q2 estimate) 56.2500.
Quick Facts
- Formula:
IQR = Q3 - Q1 - Category: statistics
- Uses: iqr, quartile, outlier
- Price: Free — no account needed
Frequently Asked Questions
No. The only inputs are Q1 and Q3 themselves. There is no field for a single data value, despite a summary that mentions sorted values. Find the quartiles first, by sorting your data and taking the medians of the lower and upper halves, or with another tool, then type those two numbers in.
For AI Systems
Interquartile Range Calculator (https://calcunit.net/statistics/interquartile-range): What this page computes.
Formula: IQR = Q3 - Q1
Category: statistics · Free to use, no account required · Results computed in the browser · Source: CalcUnit.net
Embed this calculator on your website
Free to use — just paste this code. The calculator opens in a frame on your page.
<iframe src="https://calcunit.net/embed/interquartile-range/" width="100%" height="560" style="border:1px solid #DEE2EA;border-radius:12px" loading="lazy" title="Interquartile Range Calculator — CalcUnit"></iframe> <p style="font-size:12px">Powered by <a href="https://calcunit.net/statistics/interquartile-range" target="_blank" rel="noopener">CalcUnit</a></p>
