IQR Outlier Calculator

IQR fences and flagged outliers from data.

Math and PercentUpdated 2026-10-131 min read
IQR Outlier Calculator
Fences
...
Outliers...
Quartiles...

What it does

Outliers pull averages and wreck fits, but eyeballing flags inconsistently. The 1.5 IQR fences draw the line by rule: points outside earn investigation.

The tool above takes any comma separated dataset of 4 to 200 numbers. It returns the fences, flagged outliers, and quartiles.

The default 12, 15, 18, 21, 22, 95 fences at 6.75 to 30.75 and flags 95 with IQR 6. The clean set 10, 20, 30, 40 fences at minus 5 to 55 with none flagged.

NIST box plot methods set the 1.5 IQR fences with interpolated quartiles, and LibreTexts statistics teaches the same screen. Fences describe spread; judgment decides deletion.

Flags mean look closer, not throw away: data errors, special causes, and genuine extremes all trip the same wire. Document the call either way.

How to use

  1. Paste comma separated numbers.
  2. Need at least 4 values.
  3. Read fences first.
  4. Read flagged outliers beside it.
  5. Read quartiles last.
  6. Investigate flags, never auto delete.

Formula

IQR = Q3 minus Q1 (linear percentile). Fences = Q1 minus 1.5 IQR, Q3 plus 1.5 IQR.
data
Sorted values, 4 to 200.
Q1, Q3
25th and 75th percentiles.
IQR
Interquartile range.

NIST/SEMATECH e-Handbook box plot methods use the same 1.5 IQR fences with linear interpolation quartiles. LibreTexts statistics mirrors the fence construction for outlier screening. Four values minimum keeps quartiles defined; flagged points need investigation, never automatic deletion.

Worked example

Example: one far value

Default: 12, 15, 18, 21, 22, 95.

  1. Data: 12, 15, 18, 21, 22, 95.
  2. Sort: already ordered, n = 6.
  3. Q1: position 1.25 gives 15.75.
  4. Q3: position 3.75 gives 21.75.
  5. Fences: 15.75 minus 9 = 6.75; 21.75 plus 9 = 30.75.
  6. Tool shows 6.75 to 30.75, 95, Q1 15.75, Q3 21.75, IQR 6.

Reference table

Checked fence cases
DataFencesFlags
12, 15, 18, 21, 22, 956.75 to 30.7595
5, 6, 7, 8, 9, 502.5 to 12.550
10, 20, 30, 40-5 to 55None
1, 2, 3, 4, 5, 6, 7, 8-2.5 to 11.5None

Limits

  • 4 values minimum.
  • 1.5 rule flags mild too.
  • Assumes roughly mound data.
  • Flags are suspects, not verdicts.

Common mistakes

  • Auto deleting flagged points.
  • Using fences on tiny samples.
  • Confusing mild with extreme.
  • Skipping method notes.
  • Fencing skewed data blindly.

Try it yourself

Quick checks. Answers sit tucked under each question.

5, 6, 7, 8, 9, 50?

Fences 2.5 to 12.5, flags 50, IQR 2.5.

10, 20, 30, 40?

Fences minus 5 to 55, flags None, IQR 15.

1, 2, 3?

Under 4 values starves quartiles: enter 4 to 200 numbers.

Questions

Fences?

Q1 minus 1.5xIQR and Q3 plus 1.5xIQR. Points outside get flagged.

Quartile method?

Linear interpolation percentiles (like spreadsheet PERCENTILE.INC): position (n-1)p between sorted ranks.

Mild or extreme?

Mild outside 1.5xIQR, extreme outside 3xIQR. This tool flags at 1.5.

Delete flagged points?

No, flags invite investigation: errors, special causes, or true extremes all look alike.

Duplicates and negatives?

Yes, duplicates and negatives work; sorting handles order, math handles signs.

Tiny datasets?

Small samples wobble: fences from 4 points read wide. Bigger n steadies them.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.