Interquartile Range (IQR) Calculator
Paste a list of numbers to get the first quartile, the median, the third quartile and the interquartile range in one pass. Quartiles use linear interpolation, the same method as Excel PERCENTILE.INC and NumPy, and Tukey fences at 1.5 times the IQR flag any values that sit unusually far from the middle. Everything runs in your browser, so nothing is sent to a server.
How to calculate the interquartile range
- Type or paste your numbers into the Data set box, separated by commas, spaces or new lines.
- The calculator sorts the values and updates the Q1 (25%), Median and Q3 (75%) cards as you type.
- Read the IQR card, which is simply Q3 minus Q1, the spread of the middle half of the data.
- Check the Lower fence and Upper fence cards, placed at 1.5 times the IQR beyond the quartiles.
- Look at the line under the cards for any values flagged as outliers.
- Click Copy report to copy every figure as a labeled list.
Examples
Quartiles of 1 to 9
1, 2, 3, 4, 5, 6, 7, 8, 9
Q1 = 3, Median = 5, Q3 = 7, IQR = 4, no outliers
Spotting a high outlier
3, 5, 7, 8, 9, 11, 45
Q1 = 6, Median = 8, Q3 = 10, IQR = 4, upper fence 16, outlier: 45
An even-sized set uses interpolation
10, 20, 30, 40
Q1 = 17.5, Median = 25, Q3 = 32.5, IQR = 15
Frequently asked questions
What is the interquartile range?
The IQR is the spread of the middle half of the data: the third quartile minus the first quartile (Q3 minus Q1). Because it ignores the highest and lowest values, it is resistant to extreme numbers and describes the typical spread.
Which quartile method does this calculator use?
Linear interpolation between the two closest ranks, the same rule as Excel PERCENTILE.INC and NumPy's default. The position of a quartile is (n minus 1) times the percentile on a zero based index, then blended. Tools that use a different rule can report slightly different Q1 and Q3 values.
How are outliers detected?
By Tukey's fences. The lower fence is Q1 minus 1.5 times the IQR and the upper fence is Q3 plus 1.5 times the IQR. Any value below the lower fence or above the upper fence is listed as an outlier.
Why use the IQR instead of the full range?
The full range depends on the two most extreme values, so a single outlier can inflate it wildly. The IQR trims both tails and reflects where the bulk of the data actually sits, which makes it a steadier measure of spread.
Does the order of my numbers matter?
No. The calculator sorts your values before computing anything, so you can paste them in any order, including straight from a spreadsheet column or a messy log.
How do I separate the numbers?
Use commas, spaces, new lines, or any mix of them. For example 1, 2 3\n4 all parse to the same four numbers. Negative numbers and decimals such as -2.5 are supported.
How many values do I need, and can the fences be negative?
One value works, though quartiles are only meaningful with several. Fences can be negative when the data includes small or negative numbers, which is expected: a negative lower fence just means no low outliers are possible.
Why does my result differ from another calculator?
Most differences come from the quartile method. Some tools exclude the median when splitting the data (Tukey's hinges or the exclusive method) and produce different quartiles for the same set. This tool uses the inclusive interpolation method described above.
Is my data private?
Yes. Every calculation happens locally in your browser and nothing is uploaded, so you can paste sensitive measurements without them leaving your device.
Learn more
- Quartile methods and why calculators disagree
Different methods give different Q1 and Q3 values. See why PERCENTILE.INC, the exclusive method, and the median split disagree.
Related tools
Percentile Calculator
Find the value at any percentile and the percentile rank of a value in your data set. Uses linear interpolation, the spreadsheet standard. Free and private.
Descriptive Statistics Calculator
Get a full descriptive statistics summary from a list of numbers: mean, median, mode, variance, standard deviation, quartiles and the interquartile range.
Standard Deviation Calculator
Calculate standard deviation and variance online. Paste a list of numbers to get the mean, count, and both sample and population results instantly.
Z-Score Calculator
Calculate a z-score from a value, mean, and standard deviation. See the percentile and two-tailed p-value, with a plain-English reading of the result.
Annulus Area Calculator
Calculate the area of an annulus, the ring between two concentric circles, from its outer and inner radius. Returns both circumferences and width too. Free.
Area Calculator
Find the area of a circle, square, rectangle, triangle, trapezoid, parallelogram, ellipse, sector or rhombus. Free and runs in your browser.