Interquartile Range (IQR) Calculator

Paste your dataset, and this tool will sort it, calculate Q1, median, Q3, the IQR, and show the usual Tukey outlier fences.

1. Enter your data

You can separate values with commas, spaces, or line breaks. Example: 12, 15, 15, 18, 21, 22, 26

2. Results

Q1 (25%)

Median (Q2)

Q3 (75%)

IQR (Q3 − Q1)

Count (n)

Outlier fences (Tukey)

Lower fence:

Upper fence:

Any value < lower fence or > upper fence is a potential outlier.

Detected outliers

3. Sorted data

What is the IQR?

The interquartile range (IQR) is a robust measure of variability. It tells you how spread out the middle 50% of your values are. Because it ignores the lowest 25% and highest 25% of data, it is much less sensitive to outliers than the full range.

How we computed your quartiles

This tool uses the classic “median-of-halves” method (Tukey style):

  1. Sort the data.
  2. Find the median (Q2).
  3. If n is odd, exclude the median from both halves.
  4. Q1 = median of the lower half, Q3 = median of the upper half.
IQR = Q3 − Q1
Lower fence = Q1 − 1.5 × IQR
Upper fence = Q3 + 1.5 × IQR

Why IQR is useful

  • It’s used in boxplots.
  • It’s a good default for outlier detection.
  • It’s robust and easy to explain.

Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\\]
','\
Formula (extracted text)
IQR = Q3 − Q1 Lower fence = Q1 − 1.5 × IQR Upper fence = Q3 + 1.5 × IQR
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verified by Ugo Candido on 2026-01-19
Profile · LinkedIn
, ', svg: { fontCache: 'global' } }; ]], displayMath: [['\\[','\\]']] }, svg: { fontCache: 'global' } };, svg: { fontCache: 'global' } };