Enter the observations and calculate the 1.5×IQR fences. The result marks values to investigate; it does not remove them or decide whether they are errors.
Result
One possible outlier: 25
Q1=4,Q3=9,IQR=5,25>16.5
Conditions
The IQR calculation needs at least four finite numerical observations; repeated values remain separate observations.
Quartiles use the median of each half of the sorted list. With an odd count, the overall median is excluded from both halves.
A value is flagged only when it is strictly below Q1 − 1.5×IQR or strictly above Q3 + 1.5×IQR; a value exactly on a fence is not flagged.
The optional z-score screen uses the sample standard deviation and flags |z| > 3. It requires at least two values and a positive sample standard deviation; this threshold is a screening choice, not proof of a data error.
Steps
Sort the observations Keep all seven entered values, including the extreme one, when finding quartiles.2,4,5,6,7,9,25
Find the quartiles Exclude the overall median 6; the lower half is 2, 4, 5 and the upper half is 7, 9, 25.Q1=4,Q2=6,Q3=9
Build the fences Subtract and add one and a half times the IQR to the lower and upper quartiles.IQR=9−4=5,L=4−1.5(5)=−3.5,U=9+1.5(5)=16.5
Compare each observation Only 25 is above 16.5; no value is below −3.5.25>16.5⇒flag 25
Default data set and IQR outlier check
Measure
Value
What it means
Lower quartile (Q1)
4
Median of 2, 4, 5
Median (Q2)
6
Overall middle value
Upper quartile (Q3)
9
Median of 7, 9, 25
IQR
5
9 − 4
Lower fence
−3.5
Values below this are flagged
Upper fence
16.5
Values above this are flagged
Flagged observation
25
Above the upper fence
✓
Independent check
Re-splitting the sorted list gives lower-half median 4 and upper-half median 9. Their difference is 5; both fences are 7.5 units from the corresponding quartile, and comparing all seven values leaves only 25 outside the interval [−3.5, 16.5].
Scope
What this outlier calculator covers
An outlier calculator applies a stated rule to a data set. For 2, 4, 5, 6, 7, 9, and 25, the median-of-halves quartiles are Q1 = 4 and Q3 = 9. The IQR is 5, so the 1.5×IQR fences are −3.5 and 16.5. Only 25 lies beyond a fence and is flagged as a possible outlier. A flag is a reason to inspect an observation, not an instruction to discard it.
IQR outlier fences
Sort numerical data, show the median-of-halves quartiles and 1.5×IQR fences, and list each value strictly outside them.
Compare each observation with the sample mean and sample standard deviation using the stated |z| > 3 rule. A different screen can disagree with IQR, especially when an extreme value changes the mean and standard deviation.
Examples: Sample mean and sample SD, A stated absolute-z threshold of 3
A readable box plot
Connect the quartile box, median, whiskers ending at the most extreme unflagged observations, and separate flagged points to the numerical results.
Examples: Q1 = 4, Median = 6, Q3 = 9, Separate point: 25
Unusual does not mean wrong
Keep every observation in the calculation and report flags without deleting data, replacing values, or making an unsupported causal claim.
Examples: Check the source record, Compare the value with its measurement context
How to use it
Enter enough information for one clear task
1
Enter the raw observations
Separate finite numerical values with commas, spaces, or new lines. Include each repeated measurement instead of entering a frequency summary.
2
Choose the screening rule
Start with the 1.5×IQR rule to inspect the middle-half spread. Choose z-scores only when the sample mean and standard deviation are useful reference quantities for this data.
3
Read the boundary and flagged values
Check Q1, Q3, both fences, and the sorted data before interpreting a flag. A point exactly on a fence stays inside the accepted interval.
4
Investigate before changing a data set
Look for entry errors, different units, a genuine rare observation, or separate populations. Report any later decision to exclude a value and its reason; the calculator does not make that decision.
Worked inputs
Examples to try
Use these examples to recognize the method, compare equivalent forms, and check your own work.
One high value beyond the upper fence
Q1 = 4 and Q3 = 9 give IQR = 5 and an upper fence of 16.5.
2,4,5,6,7,9,25
Expected result
25>16.5⇒flag 25
One low value beyond the lower fence
Q1 = 1 and Q3 = 5 give IQR = 4 and a lower fence of −5.
−20,1,2,3,4,5,6
Expected result
−20<−5⇒flag −20
No value beyond either fence
Q1 = 2 and Q3 = 6 give fences −4 and 12, containing all seven observations.
1,2,3,4,5,6,7
Expected result
−4≤xi≤12for every i
Even-sized data set
The four-value halves give Q1 = 5.5 and Q3 = 9.5, so the upper fence is 15.5.
4,5,6,7,8,9,10,30
Expected result
30>15.5⇒flag 30
Zero-width quartile box
Q1 and Q3 both equal 3. Both fences are 3, so the different value is flagged; such a rule needs careful interpretation.
3,3,3,3,3,3,10
Expected result
IQR=0,10>3⇒flag 10
IQR and z-score rules disagree
The IQR upper fence is 12.5, so 20 is flagged. The sample mean is 6 and sample SD is 6, giving z = 7/3 for 20, below the chosen z threshold of 3.
1,2,3,4,5,6,7,20
Expected result
20>12.5,z20=620−6=37<3
Complete example
Check seven measurements for possible outliers
Use the IQR method on all observations. The large value belongs in the ordered list while the quartiles and fences are calculated.
2,4,5,6,7,9,25
1
Locate the overall middle
The fourth of seven ordered values is 6; leave it out of the two halves.
Q2=6
2
Find the half medians
The middle value of 2, 4, 5 is 4; the middle value of 7, 9, 25 is 9.
Q1=4,Q3=9
3
Calculate both fences
The IQR is 5, and one and a half IQRs is 7.5.
L=4−7.5=−3.5,U=9+7.5=16.5
4
Check the observations, not just the endpoints
The first six values lie between the fences. The seventh is 8.5 above the upper fence.
25−16.5=8.5>0
5
Interpret the flag
The method calls 25 a possible outlier. Whether it is valid, from another process, or erroneous depends on the data context.
Flagged values={25}
L=−3.5,U=16.5,flag 25
Verification: The quartile gap is 9 − 4 = 5. Reversing each fence gives a distance of 7.5 = 1.5 × 5 from its quartile. Rechecking all seven numbers finds one and only one strict fence crossing.
Avoidable errors
Common mistakes and how to fix them
Using different quartile conventions without noticing
Problem: Comparing a median-of-halves result with software that interpolates quartiles and assuming one must be wrong.
Why it matters: Several quartile definitions are used; Q1 and Q3, and therefore the fences, can differ on a short list.
Better approach: State the convention. This calculator uses the medians of the two halves, excluding the overall median when n is odd.
Calling a fence an observed value
Problem: Treating 16.5 as the largest acceptable observation or as a whisker endpoint in the default data.
Why it matters: A fence is a decision boundary. The modified box plot's whisker stops at the largest actual unflagged value, 9.
Better approach: Keep the threshold, observed values, and plotted whisker endpoint separate.
Automatically deleting a flagged value
Problem: Removing 25 just because it exceeds the upper fence.
Why it matters: An unusual but valid measurement may be important to the question or reveal a separate process.
Better approach: Inspect units and source records, then document any justified exclusion before recalculating a summary.
Treating a z-score screen as a universal verdict
Problem: Assuming |z| ≤ 3 proves every observation is ordinary, or that |z| > 3 proves an error.
Why it matters: The mean and sample standard deviation themselves change when an extreme value is included; distribution shape and sample size matter.
Better approach: Use the z rule as an explicitly named comparison, inspect the data shape, and compare it with the IQR result when useful.
Trust the result for the right reasons
Checks, assumptions, and limits
How results are checked
Sorting preserves repeated observations. The median-of-halves convention is applied to the full list before any flag is assigned.
The IQR is recalculated as Q3 − Q1, and each fence is checked against its corresponding quartile by a distance of 1.5×IQR.
Every observation is classified by a strict comparison with both fences; exact fence matches are not flagged.
For z-scores, the sample mean and positive sample standard deviation are shown with the selected |z| > 3 threshold.
When to stop and revise the input
Fewer than four values do not support this page's IQR screen; add more observations instead of trusting a quartile split on a tiny list.
The z-score screen is undefined when sample standard deviation is zero. It also cannot replace a justified distribution model or formal outlier test.
Different accepted quartile algorithms may produce different fences for the same short data set.
A multimodal or strongly skewed data set may contain legitimate values outside a simple one-group fence.
The calculator does not infer measurement units, detect data-entry mistakes, or remove observations.
Common questions
Find possible outliers in your data FAQ
How does the IQR outlier rule work?
Find Q1 and Q3 from the ordered data, then calculate IQR = Q3 − Q1. The lower and upper fences are Q1 − 1.5×IQR and Q3 + 1.5×IQR. Values strictly beyond either fence are flagged for investigation.
Why does another calculator give different outlier fences?
It may use a different accepted quartile algorithm. This calculator takes the median of each half and excludes the overall median when the data count is odd. Compare the displayed Q1 and Q3, not only the final flags.
Is a flagged value definitely a mistake?
No. A flag means a value is unusually far from the middle under the selected rule. It could be a valid rare observation, a value from a different group, or a recording error. Its context determines what to do next.
Should I use IQR or z-scores to find outliers?
The IQR rule uses quartiles and is less tied to extreme magnitudes. A z-score screen expresses distance from the sample mean in sample-standard-deviation units and can be influenced by extremes. Neither is a universal test; name the rule and consider the data shape and purpose.
What happens if the IQR is zero?
Both fences equal the shared quartile value. Any observation different from that value is flagged by the strict rule, which can be sensitive for highly repeated data. If every value is equal, none is flagged; the z-score method is undefined because sample standard deviation is zero.
Sources and curriculum alignment
This page follows standard introductory mathematics notation and learning sequences. Use these references to continue with a complete course treatment.