Outlier Calculator

Outliers (Tukey fences)1 outlier
Lower fence-2.25
Upper fence25.75
Outlier values50
Interquartile range (IQR)7.00
How this was calculated
  1. Sorted data: 4, 6, 9, 10, 12, 15, 16, 50 — fences are always computed from the ordered data, never from the raw entry order.
  2. Q1 = 8.25 and Q3 = 15.25 by linear interpolation between closest ranks (the type-7 rule), so IQR = 15.25 - 8.25 = 7.00.
  3. Tukey fences: lower = Q1 - 1.5 x IQR = -2.25, upper = Q3 + 1.5 x IQR = 25.75. Anything outside the fences is flagged.
  4. Values outside the fences: 50 — that is 1 outlier in this data set.
  5. Tukey's 1.5 x IQR rule (1977) is a flag for investigation, not a deletion order: an outlier can be a data-entry slip, a different population, or the most interesting point in the set.

This outlier calculator flags values in your dataset that fall outside Tukey's fences — any value below Q1 - 1.5 x IQR or above Q3 + 1.5 x IQR is identified as an outlier, the same rule behind every box plot drawn since 1977. Quartiles here use the type-7 linear-interpolation method, the default in R, NumPy and Excel's QUARTILE.INC, where the quartile sits at position 1 + (n - 1) x p in the sorted data, interpolating between neighbours. The 1.5 multiplier is a convention, not a law of nature: Tukey chose it so that for perfectly normal data only about 0.7% of values fall outside, while 3 x IQR marks the 'far out' line. Remember that an outlier flag is an instruction to investigate, not to delete: the value may be a typo, a different population, or the most important observation in the set. With very small samples the fences are fragile — with three or four values the quartiles rest on one or two gaps, and the rule should be read as indicative only.

The method is resistant by design: the suspect values cannot move Q1, Q3 or the IQR much, unlike mean-and-standard-deviation tests where the outlier inflates its own detection threshold. This resistance is exactly why Tukey's fences remain the accepted standard for this kind of calculation. This page shows the formula, step-by-step workings, worked examples and sources.

Worked examples

One wild reading

Primary result: 1 outlier — The 50 sits far past the upper fence of 25.75 — flagged, while the rest of the set is tight. (8 values · 4 · 6 · 9 · 10 · 12 · 15 · 16 · 50)

Outliers (Tukey fences)1 outlier
Lower fence-2.25
Upper fence25.75
Outlier values50
Interquartile range (IQR)7.00

Clean, compact data

Primary result: No outliers — Fences at 2.00 and 30.00 contain every value: no outliers. (6 values · 10 · 12 · 14 · 18 · 20 · 25 · 0 · 0)

Outliers (Tukey fences)No outliers
Lower fence2.00
Upper fence30.00
Outlier valuesNone
Interquartile range (IQR)7.00

Outliers at both ends

Primary result: 2 outliers — Both the 1 and the 60 fall outside fences of 12.50 and 36.50. (8 values · 1 · 20 · 22 · 24 · 25 · 27 · 29 · 60)

Outliers (Tukey fences)2 outliers
Lower fence12.50
Upper fence36.50
Outlier values1, 60
Interquartile range (IQR)6.00

How the Tukey fence test works

Every outlier calculator that follows John Tukey's method runs the same four-step sequence: sort the data from lowest to highest, interpolate the quartiles, build both fences, and test every value against them. The quartiles use the type-7 linear-interpolation method, which is the default in R, NumPy and Excel's QUARTILE.INC. Under this method the quartile sits at position 1 + (n - 1) x p in the sorted data, interpolating between neighbours. Once Q1 and Q3 are fixed, the interquartile range is simply Q3 minus Q1.

Tukey's fences flag any value below Q1 - 1.5 x IQR or above Q3 + 1.5 x IQR as an outlier. This is the rule behind every box plot drawn since 1977. The 1.5 multiplier is a convention, not a law of nature: Tukey chose it so that for perfectly normal data only about 0.7% of values fall outside. A second line at 3 x IQR marks the 'far out' values. To see the whole process at work, consider a small sorted dataset of nine readings: 10, 12, 14, 16, 18, 20, 22, 24, 50. The type-7 method places Q1 at position 1 + (9 - 1) x 0.25, which is position 3, giving a value of 14. Q3 falls at position 1 + (9 - 1) x 0.75, which is position 7, giving a value of 22. The IQR is 22 - 14 = 8. The lower fence sits at 14 - 1.5 x 8 = 2, and the upper fence sits at 22 + 1.5 x 8 = 34. Testing every value, the calculator finds that 50 stands alone above the upper fence and is flagged as an outlier.

The method is resistant by design. The suspect values cannot move Q1, Q3 or the IQR much, unlike mean-and-standard-deviation tests where the outlier inflates its own detection threshold. In the worked example, the reading of 50 has no effect on the quartile positions or the IQR of 8, so the fence stays where it should. This resistance is what makes Tukey's test reliable for skewed data where a single extreme value would distort a mean-based calculation.

With very small samples the fences are fragile. With three or four values the quartiles rest on one or two gaps, and the rule should be read as indicative only. An outlier flag is an instruction to investigate, not to delete: the value may be a typo, a different population, or the most important observation in the set.

Why 1.5 x IQR

John Tukey introduced his fences in 1977, and the rule has driven every box plot drawn since. The method is straightforward: flag any value below Q1 - 1.5 x IQR or above Q3 + 1.5 x IQR as an outlier. Quartiles are computed with the type-7 linear-interpolation method, the default in R, NumPy, and Excel's QUARTILE.INC. Under this method, the quartile sits at position 1 + (n - 1) x p in the sorted data, interpolating between neighbours to produce a smooth, consistent result.

The 1.5 multiplier is a convention, not a law of nature. Tukey calibrated it against the normal distribution so that for perfectly normal data only about 0.7% of values fall outside the fences. That figure is low enough to keep false positives rare in clean data, yet high enough to catch genuine departures when they appear. For values that are truly extreme, Tukey defined a second threshold at 3 x IQR, which he called the 'far out' line. Values beyond this boundary are so distant from the bulk of the data that they warrant especially careful scrutiny.

The design is resistant by construction. Because Q1, Q3, and the IQR are based on ranks rather than raw magnitudes, suspect values cannot move them much. This stands in contrast to mean-and-standard-deviation tests, where a single extreme value inflates both the mean and the standard deviation, effectively raising its own detection threshold and making itself harder to flag. The outlier calculator based on Tukey's fences avoids that trap: the fences hold steady regardless of how extreme the outliers become.

An outlier flag is an instruction to investigate, not to delete. The flagged value may be a typo, a reading from a different population, or the most important observation in the entire set. Context determines which of these is true, and no automated rule can make that judgment. With very small samples the fences become fragile — with three or four values the quartiles rest on one or two gaps, and the rule should be read as indicative only rather than definitive.

An outlier flag is an instruction to investigate, not to delete: the value may be a typo, a different population, or the most important observation in the set.

Quartile methods disagree — here is by how much

Every outlier calculator has to pick a quartile method, and the choice changes the fences. This tool uses the type-7 linear-interpolation method, which is the default in R, NumPy and Excel's QUARTILE.INC. Under type-7, the quartile sits at position 1 + (n - 1) x p in the sorted data, interpolating between neighbours. Tukey's fences then flag any value below Q1 - 1.5 x IQR or above Q3 + 1.5 x IQR as an outlier — the rule behind every box plot drawn since 1977.

Two other common methods are median-of-halves, often called Tukey's hinges, and nearest-rank. Feed the same dataset through all three and you get slightly different quartile positions, which means slightly different fences. Most of the time the verdict is the same: a point that sits well outside the bulk of the data gets flagged regardless of method. The disagreements show up on borderline cases, where a value lands just inside one fence but just outside another. The type-7 method used here tends to place quartiles a fraction closer to the center than nearest-rank does on many datasets, which can pull the fences inward by a small amount.

The 1.5 multiplier is a convention, not a law of nature. Tukey chose it so that for perfectly normal data only about 0.7% of values fall outside. He also drew a second line at 3 x IQR to mark the 'far out' values. The method is resistant by design: the suspect values cannot move Q1, Q3 or the IQR much, unlike mean-and-standard-deviation tests where the outlier inflates its own detection threshold. That resistance is the whole point of using quartiles for detection in the first place.

With very small samples the fences are fragile. With three or four values the quartiles rest on one or two gaps, and the rule should be read as indicative only. A single unusual value can shift the interpolated position enough to change whether a neighbor gets flagged. In those situations the method matters more, and the differences between type-7, Tukey's hinges and nearest-rank are larger relative to the spread of the data.

An outlier flag is an instruction to investigate, not to delete. The value may be a typo, a different population, or the most important observation in the set. When the methods disagree on a borderline point, treat that ambiguity as a signal: the value is not extreme enough to be called an outlier by every reasonable definition, so context has to settle the question.

  • Type-7 interpolation: quartile at position 1 + (n - 1) x p, interpolating between neighbours
  • Tukey's hinges: median of the lower and upper halves of the sorted data
  • Nearest-rank: quartile taken as the value at a specific rank position, no interpolation
When three quartile methods give three different fences on the same data, the value in question is borderline by definition. Check the context before acting on it.

What to do with a flagged value

When an outlier calculator flags a value, the correct response is investigation, not deletion. Tukey's fences mark any value below Q1 - 1.5 x IQR or above Q3 + 1.5 x IQR as an outlier — the rule behind every box plot drawn since 1977. That flag is an instruction to examine the value, not a license to discard it. The observation may be a typo, a member of a different population, or the most important data point in your entire set. Removing flagged values without understanding why they were flagged is one of the fastest ways to corrupt a dataset.

Work through a simple checklist before acting on any flagged value. First, check for entry errors: a misplaced decimal, an extra digit, or a transposed number can produce a value that looks extreme but is simply wrong. Second, look for unit slips — a measurement recorded in millimeters sitting alongside values recorded in meters will always stand out. Third, consider whether you have mixed populations: data from two different groups, processes, or conditions combined into one set will naturally produce values that appear extreme relative to the whole. Fourth, if none of those explanations apply, you may have a genuine extreme — a real observation that reflects rare but meaningful variation in whatever you are studying.

There are good reasons to trust the flags this method produces. The approach is resistant by design: the suspect values cannot move Q1, Q3, or the IQR much, unlike mean-and-standard-deviation tests where the outlier inflates its own detection threshold. The quartiles here use the type-7 linear-interpolation method, the default in R, NumPy, and Excel's QUARTILE.INC, placing the quartile at position 1 + (n - 1) x p in the sorted data and interpolating between neighbours. The 1.5 multiplier is a convention, not a law of nature: Tukey chose it so that for perfectly normal data only about 0.7% of values fall outside, while 3 x IQR marks the 'far out' line.

One caution applies to small datasets. With very small samples the fences are fragile — with three or four values the quartiles rest on one or two gaps, and the rule should be read as indicative only. A flagged value in a small sample deserves scrutiny, but the statistical evidence for calling it an outlier is weaker than it would be in a larger set. Always pair the numerical flag with context about where the data came from and how it was collected.

  • Check for entry errors — typos, misplaced decimals, transposed digits
  • Check for unit slips — mixed units like millimeters and meters in the same column
  • Check for mixed populations — data from different groups combined into one set
  • Consider genuine extremes — real observations that reflect rare but meaningful variation
An outlier flag is an instruction to investigate, not to delete. The value may be a typo, a different population, or the most important observation in the set.

FAQs

What is an outlier?

An outlier is an observation far enough from the rest of the data to sit outside the Tukey fences: below Q1 - 1.5 x IQR or above Q3 + 1.5 x IQR. These values stand apart from the bulk of your data and warrant closer inspection to determine whether they reflect errors or genuine, meaningful observations.

How do I find outliers with the IQR method?

Sort the data, find Q1 and Q3, compute IQR = Q3 - Q1, then flag anything outside Q1 - 1.5 IQR and Q3 + 1.5 IQR. Values below or above these fences are your outliers. This method is robust because it relies on quartiles, which resist the pull of extreme values better than mean-based approaches.

Why is the multiplier 1.5?

Tukey's calibration: for normally distributed data it flags only about 0.7% of values, a rate low enough to mean 'look at this' rather than 'noise'. The 1.5 multiplier balances sensitivity and specificity, catching unusual values without overwhelming you with false positives from ordinary variation in your data.

Should I remove outliers from my data?

Not automatically. Investigate first — a flagged value may be an error to fix or a genuine, important observation to keep and explain. Removing outliers blindly can distort your results and hide meaningful patterns. Always document your reasoning so others can understand and verify your analytical decisions.

Which quartile method does this calculator use?

Type-7 linear interpolation between closest ranks — the default in R, NumPy and Excel's QUARTILE.INC. This widely adopted method estimates quartile positions by interpolating between ordered data points, ensuring consistency with popular statistical software. Your results will match what most analysts get using standard tools.

Can a small data set have outliers?

The fences can be computed from three values up, but with tiny samples they rest on very little information and should be treated as hints, not verdicts. Small data sets lack the depth needed for stable quartile estimates, so approach any flagged outliers cautiously and consider gathering more observations before drawing conclusions.

Sources

Related calculators

Five Number Summary Calculator
Minimum, quartiles and maximum for a small data set — the numbers behind every box plot.
Interquartile Range (IQR) Calculator
Quartiles, IQR and Tukey outlier fences for a small data set: Q1, median and Q3 by linear interpolation, with values outside the fences flagged.
Mean Absolute Deviation Calculator
How far values typically sit from their mean — the MAD for up to eight numbers, with every deviation shown.
Variance Calculator
Sample and population variance for up to eight values, with both standard deviations and the full sum-of-squares workings.