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.
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
- Q1
- Median
- Q3
- IQR
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.
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
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.
| Convention | Q1 | Median | Q3 | IQR |
|---|---|---|---|---|
| Median of halves (on screen) | 2.5 | 4.5 | 6.5 | 4 |
| Tukey hinges | 2.5 | 4.5 | 6.5 | 4 |
| R7 interpolation | 2.75 | 4.5 | 6.25 | 3.5 |
| R6 interpolation | 2.25 | 4.5 | 6.75 | 4.5 |
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.