Home / 🧮 Distributions & Plots/ IQR Calculator — Interquartile Range

IQR Calculator

Print Page
IQR Box Plot Representation
Interquartile Range Result
Interquartile Range (IQR)
-
1st Quartile (Q₁): -
Median (Q₂): -
3rd Quartile (Q₃): -
Minimum value: -
Maximum value: -
Outliers detected: -

An IQR Calculator (also known as an Interquartile Range Calculator, Middle 50% Data Spread Utility, Q3 minus Q1 Generator, or Tukey Outlier Fence Analyzer) computes the First Quartile (Q1 / 25th percentile), Second Quartile / Median (Q2 / 50th percentile), Third Quartile (Q3 / 75th percentile), Interquartile Range (IQR = Q3 - Q1), Semi-Interquartile Range / Quartile Deviation (QD = [Q3 - Q1] ÷ 2), Tukey 1.5×IQR outlier boundary fences (Upper Fence = Q3 + [1.5 · IQR]), and extreme 3.0×IQR outlier limits.

In real estate market analysis, stock return profiling, medical trial reporting, and data science exploratory data analysis (EDA), the **Interquartile Range (IQR)** measures the spread of the central 50% of an ordered dataset. Because the IQR ignores the top 25% and bottom 25% extremes, it provides a robust, outlier-resistant measure of variability that remains stable even in highly skewed distributions.

Our free online IQR Calculator provides instant calculations across all quartile and outlier parameters:

  • Interquartile Range Formula (IQR): IQR = Q3 - Q1 (Spans the middle 50% of data).
  • Quartile Rank Position Location (Lp): Lp = [ p ÷ 100 ] · ( n + 1 ) (where p = 25, 50, 75).
  • First Quartile (Q1 / 25th Percentile): 25% of data falls below this cut-off.
  • Second Quartile (Q2 / Median): 50% midpoint dividing data into equal upper and lower halves.
  • Third Quartile (Q3 / 75th Percentile): 75% of data falls below this cut-off.
  • Semi-Interquartile Range / Quartile Deviation (QD): QD = ( Q3 - Q1 ) ÷ 2 = IQR ÷ 2.
  • Tukey Moderate Outlier Fences (1.5×IQR): Lower Fence = Q1 - ( 1.5 · IQR ), Upper Fence = Q3 + ( 1.5 · IQR ).
  • Tukey Extreme Outlier Fences (3.0×IQR): Extreme Lower = Q1 - ( 3.0 · IQR ), Extreme Upper = Q3 + ( 3.0 · IQR ).

Master IQR Reference Table (Real Estate Home Sales Prices: n = 11 Sorted Home Sales)

The table below displays sorted real estate sales prices (in $1,000 USD), quartile ranks, calculated quartile boundaries, IQR, and Tukey outlier fence evaluations for 11 suburban home sales (n = 11 Homes: $180k, $210k, $220k, $240k, $250k, $270k, $290k, $310k, $340k, $380k, $650k):

Statistical Quartile Metric Position Rank Location Lp = p(12)/100 Calculated Price Value ($k) Percentile Span / Boundary Meaning Real Estate Market Interpretation
Minimum Value (Min) Rank L = 1 $180.00k ($180k) 0th Percentile Floor Lowest Sale Price in Neighborhood
First Quartile (Q1) L25 = 0.25(12) = 3 $220.00k ($220k) 25th Percentile Cut-Off Starter Home Price Ceiling (Bottom 25%)
Second Quartile (Q2 – Median) L50 = 0.50(12) = 6 $270.00k ($270k) 50th Percentile Midpoint Exact Housing Market Median Price
Third Quartile (Q3) L75 = 0.75(12) = 9 $340.00k ($340k) 75th Percentile Cut-Off Executive Home Price Floor (Top 25%)
Interquartile Range (IQR) Q3 – Q1 $120.00k ($120k) Middle 50% Price Span Core Housing Market Price Range
Semi-IQR / Quartile Deviation (QD) IQR ÷ 2 $60.00k ($60k) Half-Middle Spread Average Deviation Around Median
Tukey Lower Fence (1.5×IQR) 220 – 1.5(120) $40.00k ($40k) Low Outlier Threshold No Low Outliers Detected ($180k > $40k)
Tukey Upper Fence (1.5×IQR) 340 + 1.5(120) $520.00k ($520k) High Outlier Threshold $650k Mansion Flagged as High Outlier!

Step-by-Step Housing Market IQR Calculation

To calculate IQR and detect outliers for 11 home sales prices ($180k, $210k, $220k, $240k, $250k, $270k, $290k, $310k, $340k, $380k, $650k):

Step 1 (Calculate Q_1 Rank): L_25 = 0.25 · (11 + 1) = 0.25 · 12 = 3 &implies; Q_1 = 3rd item = $220.00k

Step 2 (Calculate Q_2 Median Rank): L_50 = 0.50 · 12 = 6 &implies; Q_2 = 6th item = $270.00k

Step 3 (Calculate Q_3 Rank): L_75 = 0.75 · 12 = 9 &implies; Q_3 = 9th item = $340.00k

Step 4 (Calculate IQR): IQR = Q_3 - Q_1 = $340.00k - $220.00k = $120.00k (Middle 50% Price Span)

Step 5 (Calculate Semi-IQR): QD = $120.00k ÷ 2 = $60.00k

Step 6 (Calculate Upper Fence): Upper Fence = Q_3 + (1.5 · IQR) = $340.00k + (1.5 · $120.00k) = $340.00k + $180.00k = $520.00k

Step 7 (Evaluate Outliers): $650.00k exceeds Upper Fence $520.00k &implies; $650.00k is a High Outlier

Thus, the housing market has an Interquartile Range of $120.00k around a median price of $270.00k, successfully isolating the $650.00k luxury mansion outlier without skewing the core market range.


Dispersion Metrics Comparison: IQR vs. Standard Deviation vs. Full Range

Below is a comparative reference chart detailing when to use IQR versus alternative measures of statistical variability:

Variability Metric Data Portion Spanned Sensitivity to Extreme Outliers Primary Practical Application
Interquartile Range (IQR) MIDDLE 50% (From Q1 to Q3) HIGHLY ROBUST (Ignores extreme top/bottom 25%) Skewed data (real estate, salaries), box plots, outlier detection.
Standard Deviation (s / σ) 100% of data (Mean squared deviations) HIGHLY SENSITIVE (Single outlier inflates result) Normal bell-curve distributions & parametric inferential tests.
Full Range (R) 100% of data (Max – Min) EXTREMELY SENSITIVE (Defined entirely by extremes) Quick rough boundary estimates.

History & Mathematics: 1879 Francis Galton to 1977 John Tukey

1879 Sir Francis Galton & Inter-Quartile Distance

In 1879, English polymath Sir Francis Galton defined the interquartile range (inter-quartile distance) and quartiles in Proceedings of the Royal Society of London, establishing non-parametric dispersion metrics.

1977 John W. Tukey & Box Plot Outlier Fences

In 1977, Princeton statistician John W. Tukey published Exploratory Data Analysis (EDA), establishing the 1.5 · IQR rule for box plot whiskers and formalizing outlier detection in modern statistics.


Popular direct tools:


Frequently Asked Questions (FAQ)

What is the formula for the Interquartile Range (IQR)?

The formula is IQR = Q3 - Q1, where Q3 is the 75th percentile and Q1 is the 25th percentile.

How does the IQR find outliers?

Multiply the IQR by 1.5. Any value below Q1 - (1.5 · IQR) or above Q3 + (1.5 · IQR) is flagged as a Tukey outlier.

Why is the IQR better than range for skewed data?

Because the **range** relies entirely on the two extreme values (Min and Max), which can be massive outliers. The **IQR** measures only the stable middle 50% of the dataset.