CalculatorForEver
MATH / CALCULATOR

Interquartile Range Calculator

Calculate interquartile range with explicit statistical conventions, probability limits and worked results.

IQR = Q3 − Q1, using the 25th and 75th sample percentiles. Lower and upper fences are Q1 − 1.5 × IQR and Q3 + 1.5 × IQR. Calculator ForEver uses the same type-7 percentile convention for both quartiles.

Your numbers

BROWSER-LOCAL INPUTS

Your inputs stay in this browser. No account needed.

RESULT

Your result

Enter your values and select Calculate.

Check the units and assumptions before using this result.

METHOD

How the interquartile range calculator works

How to use this calculator

Enter observations or distribution parameters in the stated units. Calculate, then read the method and assumptions before drawing a statistical conclusion.

What the result means

The interquartile range summarizes the spread between a sample’s 25th and 75th percentiles. Calculator ForEver calculates those quartiles with type-7 linear interpolation and subtracts Q1 from Q3. It also reports the conventional 1.5-IQR fences and flags entered observations outside them. A fence identifies values for inspection; it does not establish that those values are errors or that they should be deleted.

The formula

IQR = Q₃ − Q₁; fences = Q₁−1.5IQR and Q₃+1.5IQR

A worked example

For 1,2,3,4, Q1=1.75, Q3=3.25 and IQR=1.5 under type-7 interpolation.

Assumptions & methodology

A numerical summary does not establish sampling validity, practical importance or causation. Check the model and input assumptions before interpreting a probability. Results are rounded for display; intermediate calculations retain precision. This tool is informational and does not replace institutional or professional guidance.

References

R documentation: sample quantile methods · R documentation: IQR and quantile type · NIST: box plots

WORK THROUGH THE DETAILS

Using your interquartile range result

Calculate quartiles for a five-value sample

For the sorted data 2, 4, 6, 8 and 20, type-7 positions for Q1 and Q3 are 1 and 3. Q1 is therefore 4 and Q3 is 8, giving IQR = 4. The fences are 4 − 1.5 × 4 = −2 and 8 + 1.5 × 4 = 14. The value 20 lies above the upper fence and is flagged for inspection. The sample median remains 6. The negative lower fence is a mathematical boundary, even if the measured quantity itself cannot be negative.

Compare IQR with the full range

In that example, the full range is 20 − 2 = 18, while the IQR is four. The two summaries describe different parts of the ordered data. The range depends only on the two extremes. The IQR uses the central quartile span and is less affected by moving an already distant endpoint farther away in some samples. It does not describe the entire shape, reveal two clusters or replace a plot of the observations. Keep the sorted list available when a small summary hides a gap in the data.

Handle repeated values and zero quartile spread

If many observations share one value, Q1 and Q3 can be equal and the IQR can be zero. The resulting fences coincide. Values different from that quartile value can then lie outside the fences even if their numerical difference is small. This is a consequence of the chosen descriptive rule, not an instruction to discard every nonmatching value. Retain duplicates because they carry frequency information, and resolve missing-data codes before calculating. A single observation has zero IQR under this convention but gives no useful estimate of a population’s variability.

Check how changing an extreme affects this particular sample

Replace 20 with 200 in the five-value example 2, 4, 6, 8, 20. Under type-7 interpolation, Q1 remains four and Q3 remains eight, so the IQR stays four. The full range rises from 18 to 198, while the larger endpoint remains outside the upper fence of 14. This illustrates resistance for that sample and that change; it does not mean quartiles ignore every endpoint in every sample. With fewer observations, interpolation can involve an extreme directly. Keep the sample size and method visible when using resistance as a reason to choose one spread measure.

INTERPRETATION

Understanding interquartile range results

Keep the quartile definition consistent

Type-7 quartiles interpolate at zero-based positions (n − 1) × 0.25 and (n − 1) × 0.75 after sorting. A median-of-halves or nearest-rank method can give different results on the same short list. Name the convention when comparing homework, spreadsheet output or another calculator. Changing the quartile definition can also move the fences, so an apparent disagreement about an outlier can begin with a different calculation of Q1 and Q3.

Treat fences as an inspection rule

The 1.5 multiplier supplies a descriptive screening rule. It does not use a probability model or identify a fixed false-alarm rate for every distribution. A real extreme measurement, a data-entry error and a value from another population can all fall beyond a fence. Examine its origin before changing the dataset. A skewed distribution can produce several legitimate observations beyond one fence without implying that the original measurements were collected incorrectly.

RELATED GUIDES

Related questions and worked examples

Read a worked explanation before trying another calculation.

QUESTIONS

Interquartile Range questions

Does a fence equal the minimum or maximum?+

No. Fences are calculated boundaries. A box plot’s whiskers often stop at observed values inside those boundaries, which need not equal the fences.

Are observations on a fence flagged?+

The usual rule flags values strictly below the lower fence or strictly above the upper fence. A value exactly on a fence remains inside it.