What Are Quartiles and the Interquartile Range (IQR)?

Quartiles divide a sorted numeric dataset into four equal quarters, each holding roughly 25% of the total observations. Just as the median splits data in half at the 50% mark, quartiles place boundaries at the 25%, 50%, and 75% positions:

  • Lower Quartile (Q₁, 25th percentile): Cuts off the lowest 25% of observations from the upper 75%.
  • Second Quartile (Q₂, Median / 50th percentile): Splits ordered data strictly down the center.
  • Upper Quartile (Q₃, 75th percentile): Cuts off the bottom 75% of observations from the highest 25%.

Subtracting the first quartile from the third quartile produces the Interquartile Range (IQR = Q₃ − Q₁), which measures the width of the middle 50% of your data. Our calculator computes both textbook Exclusive (TI-84 / OpenStax) quartiles and spreadsheet Inclusive (QUARTILE.INC) quartiles, flags both Mild (1.5×IQR) and Extreme (3.0×IQR) Tukey outliers, reports Midhinge and Semi-IQR dispersion metrics, and draws a live Box-and-Whisker plot.

Quartile Formulas & Summary Equations

Always sort your dataset from lowest to highest first (x₍₁₎ ≤ x₍₂₎ ≤ … ≤ x₍ₙ₎), then apply these standard equations:

Interquartile Range (IQR): IQR = Q₃ − Q₁
Semi-Interquartile Range: Semi-IQR = (Q₃ − Q₁) ÷ 2
Midhinge (Robust Center): Midhinge = (Q₁ + Q₃) ÷ 2
Tukey Inner Fences (Mild): [ Q₁ − 1.5 × IQR , Q₃ + 1.5 × IQR ]
Tukey Outer Fences (Extreme): [ Q₁ − 3.0 × IQR , Q₃ + 3.0 × IQR ]
Quartile partition infographic splitting [6, 7, 15, 36, 39, 40, 41, 42, 43, 47, 49] into Q1=15, Q2=40, Q3=43, and IQR=28
Diagram 1: Splitting 11 sorted values around Q2 = 40 gives Q1 = 15 (lower half median) and Q3 = 43 (upper half median), yielding IQR = 28.

Why Quartile Calculators Sometimes Disagree: Exclusive vs. Inclusive Methods

One of the most common points of confusion in introductory statistics happens when students compare hand-worked textbook answers against Excel, Google Sheets, R, or Python NumPy. While all methods agree 100% on the Median (Q₂), statistics recognizes three subtle conventions for placing Q₁ and Q₃ when N is small or odd:

Comparison between Exclusive split-half TI-84 quartiles (Q1=15, Q3=43, IQR=28) and Inclusive Excel QUARTILE.INC (Q1=25.5, Q3=42.5, IQR=17)
Diagram 2: On 11 data values, excluding the center 40 yields Q1 = 15 and Q3 = 43, whereas Excel QUARTILE.INC linear interpolation yields Q1 = 25.5 and Q3 = 42.5.
Convention How Q₁ & Q₃ Are Calculated N = 11 Example Result Software Using It
Exclusive Split-Half Exclude center median on odd N, take median of lower & upper halves Q₁=15, Q₂=40, Q₃=43 AP Statistics, OpenStax, TI-83/84
Exclusive Interpolation (.EXC) Interpolate at fractional rank p × (N + 1) Q₁=15, Q₂=40, Q₃=43 Excel QUARTILE.EXC, SPSS, Minitab
Inclusive Interpolation (.INC) Interpolate at fractional rank 1 + p × (N − 1) Q₁=25.5, Q₂=40, Q₃=42.5 Excel QUARTILE.INC, R default, NumPy

Notice how Mode 2 (Exclusive vs. Inclusive) in our calculator solves both conventions side by side simultaneously, so you never waste time guessing which formula your instructor or dataset requires! As sample size grows past N = 50, both methods converge to nearly identical numbers.

2 Worked Examples

Example 1: Odd Dataset (N = 11) Quartiles, IQR & Five-Number Summary

Find Q₁, Q₂, Q₃, IQR, and Semi-IQR for this classic 11-item dataset: 6, 7, 15, 36, 39, 40, 41, 42, 43, 47, 49.

  1. Verify ascending order and locate Median (Q₂): All 11 items are sorted. Rank (11 + 1) ÷ 2 = 6th value is 40 (Q₂ = 40).
  2. Split strictly below and above 40 (Exclusive rule): The 5 values strictly below 40 are [6, 7, 15, 36, 39]; the middle item is 15 (Q₁ = 15). The 5 values strictly above 40 are [41, 42, 43, 47, 49]; the middle item is 43 (Q₃ = 43).
  3. Compute IQR, Semi-IQR & Midhinge: IQR = 43 − 15 = 28, Semi-IQR = 28 ÷ 2 = 14, and Midhinge = (15 + 43) ÷ 2 = 29.
  4. Check Tukey fences: Inner limits run from 15 − 1.5(28) = −27 to 43 + 1.5(28) = 85. All points fall neatly inside, with zero outliers.

Example 2: Even Dataset With Extreme Outlier ([10, 22, 26, 30, 34, 38, 42, 46, 50, 95])

Suppose 10 monthly delivery lead times (hours) are sorted as 10, 22, 26, 30, 34, 38, 42, 46, 50, 95. Compute quartiles and test whether 95 is a mild or extreme outlier:

  • Median (Q₂, even N = 10): Average ranks 5 (34) and 6 (38): (34 + 38) ÷ 2 = 36.
  • Lower & Upper Quartiles: Lower half [10, 22, 26, 30, 34] (5 items) has middle item 26 (Q₁ = 26). Upper half [38, 42, 46, 50, 95] (5 items) has middle item 46 (Q₃ = 46).
  • Interquartile Range (IQR): 46 − 26 = 20 hours spanning the central half of deliveries.
  • Outlier classification: Inner Upper Fence is 46 + 1.5(20) = 76; Outer Extreme Fence is 46 + 3.0(20) = 106. Because 95 sits past 76 but below 106, Tukey's test classifies 95 cleanly as a Mild High Outlier!

Mild (1.5×IQR) vs. Extreme (3.0×IQR) Outlier Fences

Statistician John Tukey designed Box-and-Whisker outlier fences around IQR so analysts can spot suspicious errors or rare anomalies without assuming data follows a normal bell curve (whereas Z-score outlier rules assume approximate normality). Under Tukey's rule, whiskers stop at the last non-outlier observation inside the 1.5 × IQR inner fences, while values beyond 1.5 × IQR (mild) or 3.0 × IQR (extreme) are plotted individually as standalone dots.

Box-and-whisker diagram demonstrating Inner Fence Q3 + 1.5*IQR and Outer Fence Q3 + 3.0*IQR separating Mild and Extreme outlier zones
Diagram 3: Differentiating normal whisker range from Tukey Mild Outliers (1.5× to 3.0× IQR) and Extreme Outliers (> 3.0× IQR).

Advanced Quartile Metrics: Midhinge, Semi-IQR & QCD

Beyond Q₁, Q₃, and IQR, researchers often report three companion quartile ratios that summarize center and relative spread robustly:

  • Midhinge ((Q₁ + Q₃) ÷ 2): An outlier-resistant cousin of the Midrange. Instead of averaging volatile extremes (Min and Max), Midhinge averages the 25th and 75th percentiles! When a distribution is skewed, comparing Midhinge against Median reveals asymmetry inside the middle 50%.
  • Semi-Interquartile Range (IQR ÷ 2): Represents half the IQR box width, serving as a robust non-parametric counterpart to Standard Deviation (for normal bell curves, Semi-IQR ≈ 0.6745 × σ).
  • Quartile Coefficient of Dispersion (QCD = (Q₃ − Q₁) ÷ (Q₃ + Q₁)): A dimensionless spread ratio (analogous to Coefficient of Variation) useful for comparing relative spread across datasets measured in completely different units (for positive distributions).

Quartile Formulas in Excel, Google Sheets & Python

Put your dataset in range A2:A12 and call the matching function for your reporting standard:

Excel Exclusive (p * (N + 1) standard): =QUARTILE.EXC(A2:A12, 1) | =QUARTILE.EXC(A2:A12, 3)
Excel / Sheets Inclusive (1 + p*(N - 1)): =QUARTILE.INC(A2:A12, 1) | =QUARTILE.INC(A2:A12, 3)
Interquartile Range (IQR): =QUARTILE.EXC(A2:A12, 3)-QUARTILE.EXC(A2:A12, 1)
Python (statistics / numpy): quantiles(data, n=4) | np.percentile(data, [25, 75])

5 Common Quartile Mistakes to Avoid

  1. Skipping the Initial Ascending Sort: Quartiles are pure rank-order statistics. Computing positions on an unsorted table produces arbitrary numbers.
  2. Confusing Quartile Cuts (3 Numbers) With Quarters (4 Groups): Just as 3 knife cuts slice a loaf of bread into 4 pieces, three quartiles (Q₁, Q₂, Q₃) divide data into four quarters. There is no "4th quartile cutoff" inside the middle (though people casually call the top quarter the "top quartile").
  3. Mixing Up Exclusive and Inclusive Conventions Mid-Report: Always stick to one convention throughout a study and note whether you used Exclusive (TI-84 / OpenStax / .EXC) or Inclusive (.INC / NumPy default).
  4. Extending Whiskers All the Way to Extreme Outliers: In a formal Tukey Box Plot, whiskers terminate at the furthest observation strictly inside the 1.5 × IQR fence, leaving outliers plotted as separate points rather than stretching the whisker out to Max.
  5. Using IQR When Sample Size Is Too Tiny (N < 4): With only 1 to 3 data points, four-quarter splits degenerate or repeat endpoints cleanly. Gather at least 4 observations before relying on quartile fences.

Measuring Distribution Skewness With Bowley's Quartile Formula

Standard Pearson skewness relies on cubed deviations around the mean, making it hypersensitive to extreme outliers. You can measure distribution asymmetry directly from the three quartiles using Bowley's Skewness Coefficient (also called the Yule-Kendall index):

Bowley Skewness = (Q₃ + Q₁ − 2 × Q₂) ÷ (Q₃ − Q₁) = ((Q₃ − Q₂) − (Q₂ − Q₁)) ÷ IQR

Because Q₃ − Q₂ is the width of the upper box half and Q₂ − Q₁ is the width of the lower box half, Bowley skewness always stays strictly bounded between −1 and +1:

  • Bowley Skewness = 0 (Symmetric Box): The median Q₂ sits equidistant between Q₁ and Q₃, meaning Midhinge = Median.
  • Bowley Skewness > 0 (Right-Skewed / Positive Skew): The upper half of the box (Q₃ − Q₂) is stretched wider than the lower half (common in household incomes, house prices, and SaaS API latencies).
  • Bowley Skewness < 0 (Left-Skewed / Negative Skew): The lower half of the box (Q₂ − Q₁) stretches further down than the upper half (common in easy exam score distributions or product satisfaction ratings).

When to Report Quartiles & IQR vs. Mean & Standard Deviation

Dataset Type Recommended Summary Why Quartiles / IQR Shine (or Fall Short)
Salaries & Home Prices Median + Q1, Q3, IQR Billionaire or luxury mansion outliers inflate Mean & SD, whereas Q1–Q3 track the typical middle 50%.
Server Latency & SLA Telemetry Median (p50) + Q1 (p25), Q3 (p75) Network spikes skew response times heavily right; IQR shows core user experience stability.
Symmetric Lab Measurements Mean + Standard Deviation On clean bell-shaped curves without outliers, Mean & SD deliver higher statistical efficiency and tight confidence intervals.
Academic Benchmarks & Admissions Middle 50% (25th to 75th Pct) Universities publish SAT/ACT Q1–Q3 ranges instead of Min–Max so extreme edge cases do not mislead applicants.

Related Statistics & Math Calculators

Build full descriptive summaries across our Math & Statistics hub:

Review how Staticnexa validates quartile conventions and edge cases in our Editorial & Mathematical Accuracy Policy.

Frequently Asked Questions

What are Q1, Q2, Q3, and IQR?

Q1 is the 25th percentile (median of the lower half), Q2 is the 50th percentile (overall median), Q3 is the 75th percentile (median of the upper half), and IQR (Interquartile Range) equals Q3 minus Q1, capturing the middle 50% spread.

Why do TI-84 and Excel give different Q1 and Q3 values?

TI-84 calculators and most introductory statistics textbooks use the Exclusive split-half method (matching QUARTILE.EXC for clean ranks), whereas Excel QUARTILE.INC and NumPy default to Inclusive p*(N - 1) interpolation. Both methods always give the exact same Median (Q2).

How do you find outliers using quartiles?

Apply Tukey fences: calculate IQR = Q3 - Q1. Values outside [Q1 - 1.5*IQR, Q3 + 1.5*IQR] are Mild Outliers, and values outside [Q1 - 3.0*IQR, Q3 + 3.0*IQR] are Extreme Outliers.

What is the Semi-Interquartile Range and Midhinge?

Semi-IQR equals IQR / 2 (half the box width, measuring robust spread). Midhinge equals (Q1 + Q3) / 2 (measuring a robust center resistant to extreme tails).

Can IQR ever be negative?

No. Because sorted Q3 is always greater than or equal to Q1, IQR = Q3 - Q1 is always zero or positive. IQR equals 0 when at least the middle 50% of values are identical.

Is there a Q0 or Q4?

Some texts casually label Minimum as Q0 (0th percentile) and Maximum as Q4 (100th percentile) to complete the Five-Number Summary, while Q1, Q2, and Q3 remain the three interior quartile boundaries.

Mathematical References & Standards