Quartiles split a sorted dataset into four equal parts, and the interquartile range between them is one of the most reliable ways to describe how spread out your data is - especially when a few extreme values could otherwise distort the picture. This calculator computes Q1, Q2 (the median), and Q3 using either of the two standard median-split conventions, then uses the interquartile range to flag statistical outliers automatically.
How quartiles and IQR are calculated
The calculation starts by sorting the dataset from smallest to largest. The median (Q2) splits the data into a lower half and an upper half. Q1 is then the median of the lower half, and Q3 is the median of the upper half. When the dataset has an even number of values, this split is unambiguous - there is no shared middle element, so every reasonable method agrees.
When the dataset has an odd number of values, there is a single middle element (the overall median), and statisticians disagree on what to do with it. The Exclusive method - originally described by John Tukey and sometimes called Tukey's hinges - drops that middle value from both halves before taking their medians. The Inclusive method, associated with Moore and McCabe, keeps the middle value in both halves. Neither is universally correct; they are simply two accepted conventions, and this calculator lets you compute and compare both.
The interquartile range, IQR = Q3 minus Q1, measures the spread of the middle 50% of the data. Because it ignores the top and bottom quarters entirely, it is far less sensitive to extreme values than the full range (max minus min).
Reading the outlier fences and box plot
Tukey's 1.5xIQR rule flags any value below Q1 minus 1.5 times the IQR, or above Q3 plus 1.5 times the IQR, as a potential outlier. This threshold is a widely used convention, not a hard mathematical law - it was chosen because, for roughly normal data, it flags only about 0.7% of values as outliers, a useful balance between over- and under-flagging.
The box plot on the IQR & Outliers tab visualizes all of this at once: the box spans Q1 to Q3, the line inside it marks the median, the whiskers extend to the most extreme values that are still inside the fences, the dashed lines mark the fences themselves, and any points beyond them are drawn as dots. A dataset with no outliers will show whiskers reaching all the way to its minimum and maximum.
When the two median methods matter
The Inclusive and Exclusive methods only produce different Q1/Q3 values when the dataset has an odd number of entries - for even-count datasets, they are mathematically identical every time. If your dataset has an odd count and you need to match a specific textbook, statistical software package, or exam answer key, check which convention that source uses; Excel's QUARTILE.INC/PERCENTILE.INC functions use a third convention entirely (linear interpolation), which can differ from both methods here for small datasets. The compare table on the Quartiles tab shows both results side by side so you can see exactly how much they diverge for your data.