Quartile & IQR Calculator

Quartile & IQR Calculator

Use this quartile calculator to split ordered data into quarters and measure the spread of its middle half.

Quick Answer

For 1 through 8, Q1 = 2.5, median = 4.5, Q3 = 6.5, and IQR = 4. This tool uses the median-of-halves convention.

IQR = Q3 − Q1; Q1 and Q3 are medians of the lower and upper halves

Enter 2–500 numbers. The median-of-halves method excludes the overall median from both halves when the count is odd.

Interquartile range
4

Median-of-halves: 6.5 − 2.5 = 4.

Q12.5
Median (Q2)4.5
Q36.5
Potential outliersNone
Steps

    Rate This Tool

    Tell us how useful this tool is.

    No ratings saved on this device yet

    Select a star to save your rating on this device.

    Embed Quartile & IQR Calculator

    Copy this iframe code into a page that permits embeds.

    How to Use the Quartile & IQR Calculator

    Enter at least two observations. The tool sorts them, finds the overall median, splits the ordered list into lower and upper halves, and takes each half’s median to obtain Q1 and Q3. It reports IQR = Q3 − Q1 and flags values outside the 1.5 × IQR fences as potential outliers.

    Which Quartile Method Does This Tool Use?

    This calculator uses the median-of-halves method. For an odd number of observations, it excludes the central median from both halves. For an even number, each half contains exactly half the observations. Spreadsheet percentile functions and some textbooks use interpolation instead, so their quartiles can differ. Check your course convention before comparing answers.

    Worked Example: Eight Ordered Values

    For 1, 2, 3, 4, 5, 6, 7, 8, the median is (4 + 5)/2 = 4.5. The lower-half median is (2 + 3)/2 = 2.5; the upper-half median is (6 + 7)/2 = 6.5. Therefore IQR = 6.5 − 2.5 = 4.

    Using IQR to Flag Potential Outliers

    The lower fence is Q1 − 1.5 × IQR; the upper fence is Q3 + 1.5 × IQR. Values strictly outside those fences are flagged as potential outliers. A flagged value is not automatically a mistake and should be investigated in context.

    Lower fence = Q1 − 1.5 × IQR
    Upper fence = Q3 + 1.5 × IQR

    Quartile & IQR FAQs

    What is the interquartile range?

    IQR is Q3 minus Q1, the width of the middle half of the ordered data.

    Is the median included in both halves?

    No. For odd-sized sets this calculator excludes the central median from both halves.

    Why does Excel give a different Q1?

    Some spreadsheet percentile functions use interpolation rather than the median-of-halves method.

    Method and references

    This calculator uses the median-of-halves convention described above. Other courses and software may use a different quartile method; compare the convention before comparing answers.

    Sources

    View references

    Disclaimer

    For educational use. Check your class or textbook convention when the problem defines a different range, sequence index, or notation.