Math calculators

quartile calculator

Updated Jul 15, 2026 By Jehan Wadia
Rate Formulas

Enter Your Data

Separate values with commas, spaces, tabs, semicolons, or new lines. Add a second line starting with f: for frequencies or cf: for cumulative frequencies. Use ranges like 10-20 for grouped data.
Calculation Method
Inclusive interpolates between sorted values. Exclusive splits the data around the median. Changing the method recalculates automatically.


Introduction

This quartile calculator finds Q1, Q2, and Q3 for any set of numbers you enter. Quartiles split your data into four equal parts. Q1 (the first quartile) marks the 25th percentile, Q2 (the median) marks the 50th percentile, and Q3 (the third quartile) marks the 75th percentile. Together with the minimum and maximum, these five values make up the five-number summary, which gives you a quick picture of how your data is spread out.

Type or paste your numbers into the box, pick a calculation method, and press Calculate. The calculator will sort your data, compute all three quartiles, find the interquartile range (IQR), check for outliers, draw a box and whisker plot, and show you every step of the math. It works with raw numbers, frequency tables, cumulative frequencies, and grouped class intervals. You can also download your results as a text file.

How to Use Our Quartile Calculator

Enter a set of numbers and pick a method. The calculator will find Q1, Q2, Q3, the five-number summary, IQR, outliers, a box plot, and a full step-by-step solution.

Dataset: Type or paste your numbers into the text box. You can separate them with commas, spaces, tabs, or new lines. If you have a frequency table, put your values on the first line and start the next line with f: followed by the matching frequencies. For cumulative frequencies, use cf: instead. For grouped data, use ranges like 10-20 as your values. You need at least 3 values.

Calculation Method: Choose Inclusive (Linear Interpolation) or Exclusive (Median Split). Inclusive finds quartiles by interpolating between sorted values. Exclusive splits the data at the median and finds the middle of each half. If you are not sure which to pick, Inclusive is the most common choice.

Calculate: Click the Calculate button to see your results. You can also press Ctrl + Enter inside the text box.

Reset: Click the Reset button to clear all inputs and start over.

Download: After you calculate, click Download Results to save everything as a text file.

What Are Quartiles?

Quartiles are values that split a sorted list of numbers into four equal parts. Think of it like cutting a data set into quarters. There are three quartile values:

  • Q1 (First Quartile): The value where 25% of the data falls below it. This is also called the lower quartile.
  • Q2 (Second Quartile): The middle value of the data set. This is the same as the median. Half the numbers are below it and half are above it. You can also find this value quickly with our median calculator.
  • Q3 (Third Quartile): The value where 75% of the data falls below it. This is also called the upper quartile.

How to Find Quartiles

To find quartiles, you first sort your numbers from smallest to largest. Then you find the positions that divide the data into four equal groups. There are two common methods to do this:

  • Inclusive (Linear Interpolation): This method uses a formula to find exact positions along the sorted data. If a position lands between two numbers, it calculates the value between them. This is the method used by most spreadsheet programs. For more on this technique, see our interpolation calculator.
  • Exclusive (Median Split): This method splits the data in half at the median. Then it finds the median of the lower half to get Q1 and the median of the upper half to get Q3. This is the method taught in most classrooms.

Interquartile Range (IQR)

The interquartile range, or IQR, is the difference between Q3 and Q1. The formula is IQR = Q3 − Q1. It tells you the spread of the middle 50% of your data. A small IQR means the middle values are close together. A large IQR means they are spread out. The IQR is useful because extreme values at the top or bottom do not affect it. For a dedicated tool, try our IQR calculator.

Five-Number Summary

The five-number summary is a set of five values that describe a data set. These five values are the minimum, Q1, Q2 (median), Q3, and the maximum. Together, they give you a quick picture of how your data is shaped and spread out. They are also the values used to draw a box and whisker plot. To explore other summary statistics like the mean, median, and mode, check out our mean median mode calculator. You can also find the full range of your data using our range calculator.

Outliers

An outlier is a number that is much higher or much lower than the rest of the data. Quartiles and the IQR help you find outliers using simple rules:

  • Mild outliers are values below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR.
  • Extreme outliers are values below Q1 − 3 × IQR or above Q3 + 3 × IQR.

These boundaries are called fences. Any data point outside a fence is flagged as an outlier. For a tool focused specifically on detecting outliers, use our outlier calculator.

Box and Whisker Plot

A box and whisker plot is a chart that shows the five-number summary in a visual way. The box covers the range from Q1 to Q3. A line inside the box marks the median. The whiskers extend from the box to the minimum and maximum values. Outliers are shown as individual dots beyond the whiskers. This chart makes it easy to see the center, spread, and skew of your data at a glance. For deeper analysis of your data's spread, you may also want to compute the standard deviation, find a z score, or look at the full statistics for your data set. If you need to find a specific percentile beyond the standard quartiles, we have a tool for that as well.


Formulas used

Quartile position (Inclusive / Linear Interpolation)
i_k = p_k \cdot (n - 1), \quad p_k \in \{0.25,\; 0.50,\; 0.75\}
Linear interpolation between sorted values
Q_k = x_{\lfloor i \rfloor} + (i - \lfloor i \rfloor)\,(x_{\lceil i \rceil} - x_{\lfloor i \rfloor})
Median (Exclusive / Median-Split method)
Q_2 = \begin{cases} x_{(n+1)/2} & \text{if } n \text{ is odd} \\ \dfrac{x_{n/2} + x_{n/2+1}}{2} & \text{if } n \text{ is even} \end{cases}
Grouped-data quartile (interpolation formula)
Q_k = L + \frac{\dfrac{kN}{4} - CF}{f} \times h
Interquartile Range (IQR)
IQR = Q_3 - Q_1
Outlier fences (mild and extreme)
\text{Mild: } [Q_1 - 1.5 \times IQR,\; Q_3 + 1.5 \times IQR] \quad \text{Extreme: } [Q_1 - 3 \times IQR,\; Q_3 + 3 \times IQR]

Frequently asked questions

What is the difference between the Inclusive and Exclusive method?

The Inclusive method uses a formula to find a position along the sorted list. If that position falls between two numbers, it calculates the exact value in between. The Exclusive method splits the data in half at the median, then finds the median of each half. Both methods can give slightly different answers for the same data. If you are not sure which to use, Inclusive is the default in most spreadsheet programs like Excel and Google Sheets.

Why do I get different quartile values than my textbook?

There are several accepted ways to calculate quartiles, and different textbooks use different methods. Try switching between Inclusive and Exclusive in the calculator. The Exclusive (Median Split) method is the one taught in most classrooms. The Inclusive (Linear Interpolation) method is used by most software. Both are correct — they are just different conventions.

How many numbers do I need to enter?

You need at least 3 numbers to calculate quartiles. With fewer than 3 values, there is not enough data to split into four parts. The more numbers you enter, the more meaningful your quartile results will be.

How do I enter a frequency table?

Put your data values on the first line. On the next line, type f: followed by the matching frequencies. For example:
5, 10, 15, 20
f: 3, 7, 4, 6
This means the value 5 appears 3 times, 10 appears 7 times, and so on.

How do I enter cumulative frequencies?

Put your data values on the first line. On the next line, type cf: followed by the cumulative frequency values. For example:
5, 10, 15, 20
cf: 3, 10, 14, 20
The calculator will convert the cumulative frequencies into individual frequencies and expand the data for you.

How do I enter grouped data with class intervals?

Use ranges like 10-20 for each class. Put the ranges on the first line and the frequencies on the next line starting with f:. For example:
0-10, 10-20, 20-30
f: 5, 12, 8
The calculator will use the grouped-data interpolation formula to find the quartiles.

Can I use separators other than commas?

Yes. You can separate your numbers with commas, spaces, tabs, semicolons, or new lines. You can even mix them. The calculator will figure it out.

What is a mild outlier vs. an extreme outlier?

A mild outlier is a value that falls outside Q1 − 1.5 × IQR or Q3 + 1.5 × IQR but still within Q1 − 3 × IQR and Q3 + 3 × IQR. An extreme outlier is a value that falls beyond Q1 − 3 × IQR or Q3 + 3 × IQR. Extreme outliers are much farther from the rest of the data than mild outliers.

Why can't the calculator find outliers for grouped data?

Grouped data only gives you class intervals and frequencies, not individual values. Since outlier detection requires checking each single value against the fences, it is not possible to identify specific outliers from grouped data.

What does the box in the box and whisker plot represent?

The box covers the range from Q1 to Q3. This is the middle 50% of your data. The line inside the box is the median (Q2). The whiskers stretch from the box to the minimum and maximum values. Red dots show any outliers.

Can I download my results?

Yes. After you calculate, click the Download Results button at the bottom. It saves all your results, the five-number summary, outliers, sorted data, and the full step-by-step solution as a plain text file.

Does this calculator work on a phone?

Yes. The calculator is fully responsive and works on phones, tablets, and computers. The box plot, result cards, and step-by-step sections all adjust to fit your screen size.

What if all my numbers are the same?

If every number is the same, then Q1, Q2, Q3, the minimum, and the maximum will all be that same number. The IQR and range will both be 0, and there will be no outliers.

Does the calculator handle decimal numbers?

Yes. You can enter whole numbers, decimals, or negative numbers. The calculator handles all of them. Results are rounded to four decimal places when needed.

Is there a limit on how many numbers I can enter?

There is no strict limit. The calculator can handle hundreds of values. For very large data sets, the sorted-data display shows the first 300 values, but all values are used in the calculations.

What is the keyboard shortcut to calculate?

Press Ctrl + Enter (or Cmd + Enter on Mac) while your cursor is in the data text box. This runs the calculation without needing to click the button.