# What are the quartiles of my data?

Computes the first, second, and third quartiles and the interquartile range of a list of numbers by a named method, with the five-number summary and outliers.

- Page: https://www.acalculator.org/statistics/quartile-calculator
- JSON spec: https://www.acalculator.org/statistics/quartile-calculator.json
- Version: 04450dc75b68

## Default answer

Example with the default inputs (Your numbers [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], Quartile method Median of halves (TI-83)): With the quartile method set to Median of halves (TI-83), Q1 is 3, the median is 5.5, and Q3 is 8, so the IQR is 5.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| input | Your numbers | The numbers, separated by commas, spaces, semicolons, or new lines. |
| method | Quartile method | How Q1 and Q3 are found. Methods agree on the median but can differ on Q1 and Q3. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| iqr | Interquartile range (IQR) | Q3 minus Q1: the spread of the middle half of the data. |
| q1 | First quartile (Q1) | The 25th percentile by the chosen method. |
| q2 | Median (Q2) | The middle value: the 50th percentile. |
| q3 | Third quartile (Q3) | The 75th percentile by the chosen method. |
| min | Minimum | The smallest number in the list. |
| max | Maximum | The largest number in the list. |
| range | Range | The maximum minus the minimum. |
| lowerFence | Lower fence | Q1 − 1.5 × IQR. Values below it are outliers. |
| upperFence | Upper fence | Q3 + 1.5 × IQR. Values above it are outliers. |
| outliers | Outliers | Values below the lower fence or above the upper fence, smallest first, or None. |
| count | Count | How many numbers are in the list. |

## Method

Sort the numbers; Q2 is the median; Q1 and Q3 follow the chosen method; IQR = Q3 − Q1; outliers lie outside Q1 − 1.5 × IQR and Q3 + 1.5 × IQR.

## Assumptions

- The default method (median of halves, median left out) is the old page’s method, so old links show the same quartiles.
- With one number, every quartile is that number.
- Outliers use Tukey’s 1.5 × IQR fences; a value exactly on a fence is not an outlier.

## Worked examples

1. input = 1 or 2, method = moore-mccabe gives q1 = 3, q2 = 5.5, q3 = 8, iqr = 5, lowerFence = -4.5, upperFence = 15.5, outliers = None. Source: OpenStax, Introductory Statistics 2e, §2.3 Measures of the Location of the Data (quartiles, interquartile range and outliers). https://openstax.org/books/introductory-statistics-2e/pages/2-3-measures-of-the-location-of-the-data.
2. input = 1 or 2, method = inclusive gives q1 = 3.25, q2 = 5.5, q3 = 7.75, iqr = 4.5. Source: NIST/SEMATECH e-Handbook of Statistical Methods, §7.2.6.2 Percentiles (sample quantile definitions). https://www.itl.nist.gov/div898/handbook/prc/section2/prc262.htm.
3. input = 1 or 2, method = exclusive gives q1 = 2.75, q2 = 5.5, q3 = 8.25, iqr = 5.5. Source: NIST/SEMATECH e-Handbook of Statistical Methods, §7.2.6.2 Percentiles (sample quantile definitions). https://www.itl.nist.gov/div898/handbook/prc/section2/prc262.htm.
4. input = 1 or 2, method = tukey gives q1 = 3, q2 = 5, q3 = 7, iqr = 4. Source: OpenStax, Introductory Statistics 2e, §2.3 Measures of the Location of the Data (quartiles, interquartile range and outliers). https://openstax.org/books/introductory-statistics-2e/pages/2-3-measures-of-the-location-of-the-data.
5. input = 1 or 2, method = moore-mccabe gives q1 = 2.5, q2 = 5, q3 = 7.5, iqr = 5. Source: OpenStax, Introductory Statistics 2e, §2.3 Measures of the Location of the Data (quartiles, interquartile range and outliers). https://openstax.org/books/introductory-statistics-2e/pages/2-3-measures-of-the-location-of-the-data.
6. input = 10 or 20, method = moore-mccabe gives q1 = 30, q2 = 55, q3 = 80, iqr = 50, upperFence = 155, outliers = 1000. Source: OpenStax, Introductory Statistics 2e, §2.3 Measures of the Location of the Data (quartiles, interquartile range and outliers). https://openstax.org/books/introductory-statistics-2e/pages/2-3-measures-of-the-location-of-the-data.

## FAQ

### What are quartiles and why are they important?

Quartiles divide a dataset into four equal parts, each containing 25% of the data. Q1 (first quartile) is the 25th percentile, Q2 (second quartile) is the median (50th percentile), and Q3 (third quartile) is the 75th percentile. Quartiles help understand data distribution, identify central tendency, and detect outliers.

### How are quartiles calculated?

There is more than one standard method, and they can give different Q1 and Q3 for the same data. The default here: 1) Sort data in ascending order, 2) Find the median (Q2), 3) Q1 is the median of the lower half (excluding Q2 if odd number of values), 4) Q3 is the median of the upper half (excluding Q2 if odd number of values). This is the method of the TI-83 and many textbooks. You can also pick Tukey’s hinges, or the inclusive and exclusive methods used by Excel.

### Why do different calculators give different quartiles?

Because they use different methods. For 1 to 10, the median-of-halves method gives Q1 = 3 and Q3 = 8, Excel QUARTILE.INC gives 3.25 and 7.75, and Excel QUARTILE.EXC gives 2.75 and 8.25. All three are correct for their method. Pick the method your course or software uses.

### What is the interquartile range (IQR) and why is it useful?

The interquartile range (IQR) is Q3 - Q1, representing the middle 50% of the data. It's a robust measure of spread that's not affected by extreme outliers. IQR is used to identify outliers (values beyond Q1 - 1.5×IQR or Q3 + 1.5×IQR) and provides a better measure of variability than range for skewed distributions.

### What's the difference between quartiles and percentiles?

Quartiles are specific percentiles: Q1 = 25th percentile, Q2 = 50th percentile (median), Q3 = 75th percentile. While percentiles can be any value (1st, 2nd, 10th, etc.), quartiles specifically divide data into four equal parts. Percentiles provide more granular division of data distribution.

### How do I interpret the quartile results?

Q1 shows where 25% of data falls below, Q2 (median) shows the middle value, and Q3 shows where 75% of data falls below. The IQR shows the spread of the middle 50% of data. A large IQR indicates high variability, while a small IQR suggests data is clustered around the median.

### What are outliers and how do quartiles help identify them?

Outliers are data points that fall significantly outside the normal range. The 1.5×IQR rule identifies outliers as values below Q1 - 1.5×IQR or above Q3 + 1.5×IQR. Quartiles help establish these boundaries and provide a systematic way to detect unusual values in your dataset.

### When should I use quartiles instead of mean and standard deviation?

Use quartiles when your data is skewed, has outliers, or isn't normally distributed. Quartiles are robust statistics that aren't affected by extreme values, unlike mean and standard deviation. They're particularly useful for exploratory data analysis and when you need to understand data distribution patterns.

### How do quartiles relate to box plots?

Box plots (box-and-whisker plots) are visual representations of quartiles. The box shows Q1, Q2 (median), and Q3, with the whiskers extending to the minimum and maximum values. Some box plots end the whiskers at the fences and show outliers as individual points. Box plots provide a quick visual summary of data distribution and spread.

### What does it mean if Q1 and Q3 are close together?

If Q1 and Q3 are close together, it means the middle 50% of your data is clustered tightly around the median, indicating low variability in the central portion of your dataset. This often suggests a more uniform or consistent distribution in the middle range of your data.

### What's the relationship between quartiles and the five-number summary?

The five-number summary consists of minimum, Q1, median (Q2), Q3, and maximum. It provides a complete picture of data distribution and is the foundation for box plots. This summary gives you both the central tendency (median) and spread (range and IQR) of your data in a compact format.

### How do quartiles help with data cleaning and validation?

Quartiles help identify potential data quality issues by revealing unusual patterns. Large gaps between quartiles might indicate missing data or measurement errors. Outliers detected through the IQR method can highlight data entry errors, extreme values that need investigation, or genuine but unusual observations.

### How do quartiles compare to other measures of central tendency?

Quartiles complement other measures: the median (Q2) is more robust than the mean for skewed data, Q1 and Q3 show where data clusters, and the IQR provides a robust measure of spread compared to standard deviation. Together, they give a comprehensive view of data distribution without being overly sensitive to outliers.

### What are some practical applications of quartile analysis?

Quartile analysis is used in quality control (identifying defective products), finance (analyzing investment returns), healthcare (understanding patient data distributions), education (grading systems), and research (comparing groups). It's particularly valuable when you need to understand data distribution patterns and identify unusual values.

## Sources

- OpenStax, Introductory Statistics 2e, §2.3 Measures of the Location of the Data (quartiles, interquartile range and outliers). https://openstax.org/books/introductory-statistics-2e/pages/2-3-measures-of-the-location-of-the-data
- NIST/SEMATECH e-Handbook of Statistical Methods, §7.2.6.2 Percentiles (sample quantile definitions). https://www.itl.nist.gov/div898/handbook/prc/section2/prc262.htm
