gizmobench
BrowseDaily

Quartile Calculator

Paste a list to calculate quartiles, interquartile range and 1.5 x IQR fences. Choose median of halves, Tukey hinges, R7 or R6; the working and comparison table show how the convention affects your result. A box plot marks values outside the fences, which remain in the data. The core calculator is free and needs no account.

8 valuesMedian of halvesFive-number summary1.5 x IQR fences
convention     median of halves, odd centre excludeddata sorted    1  2  3  4  |  5  6  7  8method         Q1 is the median of the lower 4, Q3 the median of the upper 4.min 1    Q1 2.5    median 4.5    Q3 6.5    max 8IQR            6.5 - 2.5  =  4fences         -3.5  and  12.5same data under R7 linear interpolation at 1 + (n - 1)pQ1 2.75    Q3 6.25    IQR 3.5
18
Q1
2.5
Median
4.5
Q3
6.5
IQR
4

Box plot on an axis from 1 to 8. Whisker at 1, box from 2.5 to 6.5 with the median at 4.5, whisker at 8. No value is outside the fences.

Quartile convention
What to put first

The minimum, Q1, the median, Q3 and the maximum, with the fences underneath.

Under median of halves, odd centre excluded, 8 values give min 1, Q1 2.5, median 4.5, Q3 6.5 and max 8, an interquartile range of 4.

Commas, spaces, tabs, semicolons and new lines all separate values, so a column copied from a spreadsheet pastes straight in, and up to 10,000 values are read at a time. Figures on screen are rounded to six decimal places; the arithmetic itself keeps full double precision. Nothing you type leaves this browser.

Worked examples

  • 1 to 8, median of halveseven count, halves are clean
    Q1 2.5, median 4.5, Q3 6.5, IQR 4
  • Same data under R7linear interpolation
    Q1 2.75, median 4.5, Q3 6.25, IQR 3.5
  • 1, 2, 3, 4, 5, 6, 7, 100the fences decide
    Fences -3.5 and 12.5: 100 listed outside, kept in the data

Where the conventions disagree

The same 8 values under all four conventions. They agree on the median, always. Where they differ, it is on Q1 and Q3.

Q1, median, Q3 and IQR under each quartile convention
ConventionQ1MedianQ3IQR
Median of halves (on screen)2.54.56.54
Tukey hinges2.54.56.54
R7 interpolation2.754.56.253.5
R6 interpolation2.254.56.754.5
The convention on screen. Split the sorted data at the median, then take the median of each half. When the count is odd the middle value goes in neither half. Moore and McCabe, the TI-83 and TI-84, and most school textbooks.
Why two calculators disagree. On 1, 2, 3, 4, 5, 6, 7, 8 the median of halves gives Q1 and Q3 of 2.5 and 6.5, an IQR of 4, while R7 interpolation gives 2.75 and 6.25 and an IQR of 3.5. Both are right under the convention that produced them, so the one to use is the one your course, your journal or your software uses. Enter a valid list to compare all four conventions on your own numbers.

Common questions

Why do quartile conventions give different answers?
They split or interpolate the sorted data differently. On 1 to 8, median of halves gives Q1 2.5, median 4.5 and Q3 6.5, so IQR is 4. R7 gives Q1 2.75 and Q3 6.25, so IQR is 3.5. R6 gives 2.25 and 6.75. The calculator names the chosen convention and compares all four results.
How do I find Q1 and Q3 with this calculator?
Enter the raw values in Your numbers and choose Quartile convention. Median of halves sorts the data and takes the median of each half, leaving an odd middle value out. Tukey hinges includes that middle value in both halves. For 1 to 9, their Q1 values are 2.5 and 3 respectively. Q2 is the median, shown alongside Q1 and Q3.
Which quartile formulas are implemented?
R7 interpolates at one-based position 1 + (n - 1)p; R6 uses (n + 1)p, with p equal to 0.25 or 0.75. R7 corresponds to QUARTILE.INC-style quartiles. On short lists this tool clamps R6 positions to the end values and reports it, while QUARTILE.EXC can refuse those positions. Median of halves and Tukey hinges use the sorted halves described in the working.
How do I find the range and interquartile range?
Choose Interquartile range under What to put first. IQR is Q3 minus Q1, the width between the first and third quartiles; the plot draws that interval as its box. Range is maximum minus minimum and appears in the copied result. For 1 to 8 under median of halves, IQR is 4 and range is 7.
How do lower and upper outlier fences work?
Choose Outlier fences. The lower fence is Q1 - 1.5 x IQR and the upper fence is Q3 + 1.5 x IQR. For 1, 2, 3, 4, 5, 6, 7, 100 under median of halves, the fences are -3.5 and 12.5. The tool flags 100, keeps it in the data, and ends the upper plot whisker at 7. A value exactly on a fence is not flagged.
Does this tool delete outliers from my data?
No. A flagged value is still counted, still sorted, still in the minimum or maximum, and still part of the quartiles themselves. The fence rule says a value sits far from the middle of this list, and that is all it can say: whether it is a measurement fault, a rare event or the interesting part of the data is a question about the data, not about the arithmetic. Nothing here calls it a mistake and nothing removes it for you.
What can I paste, and how many values?
Enter 2 to 10,000 raw values separated by commas, spaces, tabs, semicolons or new lines. Negative numbers, decimals and exponents such as 1e3 work. Commas always separate values: write 1200, not 1,200, for one thousand two hundred. This accepts raw observations, not grouped frequency intervals.
Can I use this in a phone browser and copy the results?
Yes. Enter or paste the data in a current phone or desktop browser. Copy gives tab-separated quartiles, median, IQR, range, fences, flagged values, all four conventions and the sorted list. Calculation happens in the page; your draft is remembered in this browser when storage is available.

Uses browser double-precision arithmetic under the named quartile convention, with ordinary figures rounded to six decimal places and very large or small figures shown in scientific notation. Values outside the 1.5 x IQR fences are listed and kept in the data; a flag alone does not identify a mistake.