Quartile Calculator (Q1, Median, Q3 & IQR)

Descriptive statistics & outliers

Paste your dataset and get Q1, median, Q3, interquartile range (IQR) and outliers. Compare Tukey quartiles with an inclusive (Excel-style) definition and see all steps clearly.

Typical use cases: summarising exam scores, salaries, response times, lab measurements, dashboards in Excel/Sheets, or quick sanity checks when preparing reports and boxplots.

1. Enter your data

Up to 5,000 values Ignores blanks

You can paste from Excel or Google Sheets: the calculator automatically splits by spaces, commas, semicolons and line breaks.

Sample datasets:

2. Quartile method, rounding and order

Quartile definition

Quartiles are always computed on ascending data; this option only affects the preview.

Q1 (25th percentile)
Median (Q2)
Q3 (75th percentile)
IQR = Q3 − Q1
Tukey fences (outlier thresholds)
Lower fence:
Upper fence:
Extreme values
Min:
Max:
Count
Total values:
Distinct:

3. Sorted data, positions and outliers

Ordered values (with positions) Method: —
# Value Notes
Outliers (Tukey 1.5×IQR rule)
Below lower fence:
Above upper fence:

Formulas used

IQR = Q3 − Q1

Lower fence = Q1 − 1.5 × IQR

Upper fence = Q3 + 1.5 × IQR

Values outside these fences are marked as outliers in boxplots and summary tables.

What are quartiles and why do they matter?

Quartiles are values that divide an ordered dataset into four parts with roughly the same number of observations:

  • Q1: about 25% of the data lie below this value;
  • Q2 (median): 50% of the data lie below this value;
  • Q3: about 75% of the data lie below this value.

Together with the minimum, maximum and the interquartile range (IQR), quartiles form the backbone of boxplots and many descriptive summaries.

Core relationships

IQR = Q3 − Q1

Lower fence = Q1 − 1.5 × IQR

Upper fence = Q3 + 1.5 × IQR

Any observation below the lower fence or above the upper fence is flagged as a potential outlier according to Tukey’s rule.

Different quartile conventions (Tukey vs inclusive)

If you enter a small dataset into different calculators or software packages, you may notice that Q1 and Q3 sometimes differ by one or two units. This is not a bug: it comes from different quartile definitions.

  • Tukey (median-of-halves) splits the ordered data at the median and then takes the median of each half. When the sample size is odd, the central value is not included in either half.
  • Inclusive (Excel-style) uses linear interpolation among ordered values. It behaves like Excel’s QUARTILE.INC and is convenient when aligning with spreadsheet output.

This calculator shows both approaches (one at a time, with a clear label) so that you can match your organisation’s convention and still understand how the other definition behaves.

Interpreting IQR and outliers responsibly

The interquartile range measures the spread of the middle 50% of the data. A small IQR suggests that most values are clustered around the median; a large IQR indicates more variability.

Outlier flags based on 1.5 × IQR should be treated as diagnostic hints, not automatic deletion rules. In many applications, extreme values are precisely the observations we care about most (e.g. rare failures, unusual responses, extreme performers).

FAQ: quartiles, percentiles and this calculator

How do quartiles relate to percentiles?

Q1, Q2, and Q3 correspond to the 25th, 50th, and 75th percentiles. In general, the p-th percentile is the value below which p% of observations fall. Quartile definitions are special cases of more general percentile algorithms.

Can I use this with grouped data or frequencies?

This version of the calculator assumes raw ungrouped data. If you have class intervals or frequency tables, you can often expand them into raw values (e.g. by repeating each mid-point according to its frequency) or use specialised grouped-data formulas.

How many data points do I need for quartiles to be meaningful?

Quartiles can technically be defined even for very small samples, but they become more stable and informative as the sample size grows. With fewer than about 10 observations, small changes in the data can move Q1 and Q3 quite a lot, and different definitions may disagree strongly.

Is this calculator suitable for formal statistical inference?

The tool is designed for descriptive analysis, exploratory work, teaching and day-to-day reporting. For high-stakes decisions, confirm your choices and assumptions with a statistician and, where appropriate, use confidence intervals or formal tests for quantiles.