Interquartile range calculator
Sort the observations, take the median of each half as Q₁ and Q₃, then report IQR = Q₃ − Q₁.
inputs.
How to use this calculator
The interquartile range measures the width of the middle half of a sorted data set. This tool sorts the values, finds the median of the lower half for Q₁ and the median of the upper half for Q₃, then subtracts Q₁ from Q₃. That median-of-halves convention is stated because software packages can use different percentile definitions, especially for small samples.
Formula
IQR = Q₃ − Q₁; quartiles use the median-of-halves method
Assumptions and limits
Inputs should use consistent units and valid values. The result is a planning aid; review the assumptions above and verify the method fits your situation before relying on it.
Related calculators and articles
Compare methods and explore more free tools in statistics.
How to use the Interquartile range calculator
Sort the observations, take the median of each half as Q₁ and Q₃, then report IQR = Q₃ − Q₁.
What this calculator measures
The IQR is the distance between the lower and upper quartile boundaries. Unlike the full range, it summarizes the middle half of the observations; its value depends on the convention used to define Q₁ and Q₃.
Inputs and units
Enter at least four observations in one consistent unit, separated by commas, semicolons, or whitespace. Every nonempty token must be a finite number; malformed tokens are rejected rather than skipped. The calculator sorts the observations, so entry order does not affect the quartiles.
- Comma-separated data values: Enter raw observations, not precomputed quartiles. Keep every value in the same measurement unit.
Formula and quartile method
After sorting, this calculator takes Q₁ as the median of the lower half and Q₃ as the median of the upper half; IQR = Q₃ − Q₁. For an odd sample size, it excludes the overall median from both halves. Other quartile conventions can return different values.
Worked example
For the displayed eight-value example, the lower half is 4, 7, 9, 10 and the upper half is 12, 15, 18, 21. Their medians are Q₁=8 and Q₃=16.5, giving IQR=8.5 in the data unit.
How to use the calculator
- Collect at least four observations of the same variable and measurement basis.
- Enter the values separated by commas, semicolons, or whitespace; keep their units consistent.
- Review the stated median-of-halves convention before comparing its quartiles with software using another method.
- Use IQR to compare spread only when the groups and measurement units are comparable.
Interpreting the result
IQR=8.5 means the middle half of the example spans 8.5 units. It describes spread, not the sample mean or a list of observations that must be erroneous.
Assumptions and limits
Quartile conventions differ across packages. This page uses the median-of-halves method; an interpolation-based package can return different Q₁ and Q₃ values for the same data.
Keep the sample, missing-value policy, and measurement units consistent when comparing IQRs. The statistic is robust to isolated extremes but does not replace checking data quality.
References: NIST Engineering Statistics Handbook: IQR and box plots defines the IQR as Q₃−Q₁; NumPy quantile documentation lists distinct sample-quantile methods.
Frequently asked questions
What information do I need?
Enter at least four finite numeric observations separated by commas, semicolons, or whitespace. Use one consistent unit; malformed tokens are rejected and entry order does not change the sorted quartiles.
How should I interpret the result?
IQR is Q₃−Q₁, the width of the middle half under this page’s median-of-halves convention. It uses the same unit as the data and is less affected by extreme endpoints than the full range.
Is the Interquartile range calculator free to use?
Yes. This calculator is free and works in your browser without an account.
How do I use the Interquartile range calculator?
Enter Comma-separated data values. Match the units shown beside each field and review the result together with the assumptions below.
What is a worked example of Interquartile range?
For the displayed eight-value example, the lower half is 4, 7, 9, 10 and the upper half is 12, 15, 18, 21. Their medians are Q₁=8 and Q₃=16.5, giving IQR=8.5 in the data unit.
Read the calculation methodology and privacy policy.