4 quartile methods comparedReviewed 28 Sep 2026Runs in your browser

Quartile & IQR Calculator

Find the five-number summary, quartiles (Q1, Q2, Q3), interquartile range and Tukey outlier fences for a list of numbers — with a box plot, the rank arithmetic, and a live comparison of the four common quartile methods so you can match your textbook or software.

Who wrote it

Written by Suhaib Hassan. Methods follow Hyndman & Fan (1996) and Tukey (1977), and each is checked against a hand-worked data set. Our methodology.

How the engine works

It sorts your data, finds each quartile's rank position, and interpolates between neighbouring values where the rank is not a whole number.

Why we built it

Textbooks, Excel and R often report different Q1 and Q3 for the same data. This page shows all four methods side by side instead of hiding the choice.

Data set

—

Separate values with commas, spaces or new lines.

the four differ only in how they place the cut points

—

Interquartile range (IQR)—
—

—

Semi-IQR (IQR ÷ 2)—
Midhinge (Q1 + Q3) ÷ 2—
Minimum
—

—

Q1 (25th percentile)
—

—

Median (Q2)
—

—

Q3 (75th percentile)
—

—

Maximum
—

—

Count (n)
—

Values used

Tukey outlier fences—
Inner lower (Q1 − 1.5 × IQR)—
Inner upper (Q3 + 1.5 × IQR)—
Outer lower (Q1 − 3 × IQR)—
Outer upper (Q3 + 3 × IQR)—

—

Box-and-whisker plot

The box spans Q1 to Q3 with the median marked. Whiskers reach the most extreme values inside the inner fences; dots beyond them are outliers.

—

—

Step-by-step working

—

—

    Why different tools give different quartiles

    Your data run through all four methods. The row for the method you selected is highlighted.

    live from your data
    MethodQ1MedianQ3IQRUsed by
    The methods agree for some data sizes and differ for others. None is “wrong” — always state which one you used.

    Why quartiles instead of mean and standard deviation?

    Quartiles and the IQR are resistant statistics: a few extreme values barely move them, whereas the mean and standard deviation can shift a lot.

    Example with the default data n = 14

    With the outlier 95: mean = 35.14, median = 29
    Without it (n = 13): mean = 30.54, median = 28

    Dropping one extreme value moves the mean by about 4.6 but the median by only 1.

    Breakdown point 25%

    Up to a quarter of the data can be replaced by arbitrarily extreme values before the quartiles themselves are dragged away. The mean can be moved arbitrarily by changing a single value.

    Where quartiles are used

    Exploratory analysis

    Box plots built from the five-number summary show centre, spread and skew at a glance, and make side-by-side group comparisons easy.

    Five-number summary

    Outlier screening

    Tukey’s 1.5 × IQR rule flags unusually high or low readings — for example a faulty sensor value or a mistyped entry — for review.

    Inner and outer fences

    Skewed data

    Incomes, house prices and response times are skewed, so they are often summarised by the median and IQR rather than the mean and standard deviation.

    Robust summaries

    What are quartiles and the IQR?

    Quartiles split a sorted data set into four parts holding roughly equal numbers of values. Q1 is the 25th percentile, Q2 is the median (50th percentile) and Q3 is the 75th percentile. The interquartile range, IQR = Q3 − Q1, is the spread of the middle half of the data.

    How the four methods place the cut points

    • Inclusive (R-7): rank L = 1 + p(n − 1), interpolating between neighbouring sorted values. Used by Excel QUARTILE.INC, R’s default and NumPy’s default.
    • Exclusive (R-6): rank L = p(n + 1), interpolating. Used by Excel QUARTILE.EXC, Minitab and SPSS; needs n ≥ 3.
    • Tukey’s hinges: split the sorted data at the median and take the median of each half; for an odd n the median belongs to both halves.
    • Moore & McCabe: as above, but for an odd n the median is left out of both halves.

    By Suhaib Hassan · Reviewed 28 September 2026 · How CalculatePilot verifies formulas →

    Tukey’s outlier fences

    Values below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR lie outside the inner fences and are flagged as possible (mild) outliers. Values beyond Q1 − 3 × IQR or Q3 + 3 × IQR lie outside the outer fences and are flagged as extreme. A flag is a prompt to investigate, not proof that a value is an error.

    Sources

    Frequently asked questions

    Why does Excel give a different Q1 than my textbook?

    Excel’s QUARTILE.INC interpolates at rank 1 + 0.25(n − 1), while many textbooks take the median of the lower half. Both are legitimate definitions; the comparison table above shows the results side by side for your data.

    What is the interquartile range used for?

    It measures the spread of the middle 50% of the data and, unlike the range or standard deviation, is barely affected by extreme values. It is also the basis of Tukey’s outlier fences.

    How are mild and extreme outliers classified?

    A value beyond 1.5 × IQR from the nearer quartile is a mild outlier; beyond 3 × IQR it is an extreme outlier. The 1.5 and 3 multipliers are Tukey’s conventions rather than laws of nature.

    Can the lower fence be negative when all data is positive?

    Yes. The fence is a calculation from Q1 and the IQR, so it can fall below zero even if every value is positive. It simply means no value is low enough to be flagged at the bottom.

    What is the difference between quartiles and percentiles?

    Quartiles are specific percentiles: Q1 is the 25th, Q2 the 50th and Q3 the 75th. Percentile methods share the same definitional choices as the quartile methods on this page.

    How many values do I need?

    Quartiles can be computed from as few as two values with the inclusive and hinge methods, but they are only meaningful with a reasonable amount of data. The exclusive method requires at least three values.

    Related statistics calculators

    Continue your analysis.

    All Math Calculators

    Embed This Quartile Calculator

    Free and responsive, and it runs in the visitor's browser. Branding removal from $7.99/month.

    <iframe src="https://www.calculatepilot.com/embed/quartile-calculator.html" width="100%" height="560" loading="lazy" title="Quartile Calculator"></iframe>
    For website owners

    Want this calculator on your own website?

    Embed it in one line of code. Keep it free with a small CalculatePilot attribution link, or go white-label: your brand, no attribution, one license for all your domains.

    • All 159 calculators, unlimited embeds
    • Works on WordPress, Webflow, Squarespace, Wix and plain HTML
    • Runs in your visitor's browser, so nothing is sent to a server
    • License key emailed automatically after checkout, cancel anytime
    $7.99 / month
    or $89.99 / year · white-label Pro
    Get the white-label license Embed free with attribution