πŸ“Š Basic Tutorial

What are Quartiles?
Complete Beginner's Guide

Learn quartile concepts, calculation methods, and practical applications from scratch. Understand Q1, Q2, Q3, IQR, and how to calculate quartiles step-by-step with real examples.

Published: October 17, 2025
Reading Time: 8 minutes
Difficulty Level: Beginner

1. What are Quartiles?

Quartiles are values that divide a dataset into four equal parts. They are one of the most commonly used measures in statistics to understand the distribution and spread of data.

Think of quartiles as dividing your data into quarters:

  • Q1 (First Quartile): The value below which 25% of the data falls
  • Q2 (Second Quartile): The value below which 50% of the data falls (also known as the median)
  • Q3 (Third Quartile): The value below which 75% of the data falls

πŸ’‘ Key Insight

Quartiles help you understand how your data is distributed. If Q1 and Q3 are close together, your data is concentrated in the middle. If they're far apart, your data is spread out.

2. Quartile Definitions: Q1, Q2, Q3

Q1 (First Quartile / Lower Quartile)

Q1 is the value that separates the lowest 25% of data from the rest. It's also called the lower quartile.

Example: If you have 100 test scores, Q1 is the score below which 25 students scored.

Q2 (Second Quartile / Median)

Q2 is the value that separates the lower 50% of data from the upper 50%. It's the same as the median.

Example: If you have 100 test scores, Q2 is the score below which 50 students scored (the middle score).

Q3 (Third Quartile / Upper Quartile)

Q3 is the value that separates the lowest 75% of data from the highest 25%. It's also called the upper quartile.

Example: If you have 100 test scores, Q3 is the score below which 75 students scored.

3. How to Calculate Quartiles

There are different methods to calculate quartiles. The most common method is the Tukey method (also called Tukey's Hinges). Here's how to calculate quartiles step-by-step:

Step-by-Step Process

  1. Sort your data from smallest to largest
  2. Find Q2 (median): The middle value of your dataset
  3. Find Q1: The median of the lower half of data (values below Q2)
  4. Find Q3: The median of the upper half of data (values above Q2)

πŸ“Š Example Calculation

Data: [12, 15, 18, 20, 22, 25, 28, 30, 35, 40]

Step 1: Data is already sorted

Step 2: Q2 (median) = (22 + 25) / 2 = 23.5

Step 3: Q1 = median of [12, 15, 18, 20, 22] = 18

Step 4: Q3 = median of [25, 28, 30, 35, 40] = 30

⚠️ Important Note

Different software (Excel, R, Python) may use slightly different methods to calculate quartiles, which can lead to different results. Learn more about quartile software differences and how to choose the right method for your needs.

4. Interquartile Range (IQR)

The Interquartile Range (IQR) is the difference between Q3 and Q1. It measures the spread of the middle 50% of your data.

Formula

IQR = Q3 - Q1

Example: If Q1 = 18 and Q3 = 30, then IQR = 30 - 18 = 12

The IQR is useful because:

  • It's resistant to outliers (unlike the range)
  • It helps identify outliers using the 1.5Γ—IQR rule
  • It's used in box plots to define the box

πŸ” Outlier Detection

Values below Q1 - 1.5 Γ— IQR or above Q3 + 1.5 Γ— IQR are considered outliers. Learn more about outlier detection methods.

5. Practical Examples

Example 1: Test Scores

Scenario: Calculate quartiles for test scores: [65, 70, 75, 80, 85, 90, 95]

Calculation:

  • Q2 (median) = 80
  • Q1 = median of [65, 70, 75] = 70
  • Q3 = median of [85, 90, 95] = 90
  • IQR = 90 - 70 = 20
β†’ Try this example in PlotNerd β†’

Example 2: Monthly Sales

Scenario: Calculate quartiles for monthly sales (in thousands): [12, 15, 18, 20, 22, 25, 28, 30]

Calculation:

  • Q2 (median) = (20 + 22) / 2 = 21
  • Q1 = median of [12, 15, 18, 20] = (15 + 18) / 2 = 16.5
  • Q3 = median of [22, 25, 28, 30] = (25 + 28) / 2 = 26.5
  • IQR = 26.5 - 16.5 = 10
β†’ Try this example in PlotNerd β†’

6. Common Uses of Quartiles

πŸ“Š Box Plots

Quartiles are the foundation of box plots. Q1 and Q3 form the edges of the box, and Q2 (median) is marked inside the box. Learn how to read box plots.

πŸ” Outlier Detection

Use the IQR method to identify outliers. Values outside Q1 - 1.5Γ—IQR or Q3 + 1.5Γ—IQR are considered outliers. Compare with MAD method.

πŸ“ˆ Data Analysis

Quartiles help understand data distribution, identify skewness, and compare different datasets. Useful for comparing multiple groups and choosing the right central tendency (mean vs median vs mode).

πŸ“š Education

Quartiles are essential for understanding statistics, especially in descriptive statistics and exploratory data analysis.

7. FAQ

Q: What's the difference between quartiles and percentiles?

A: Quartiles are specific percentiles: Q1 is the 25th percentile, Q2 is the 50th percentile (median), and Q3 is the 75th percentile. Percentiles can be any value from 0 to 100, while quartiles are specifically the 25th, 50th, and 75th percentiles.

Q: Why do different software calculate different quartiles?

A: There are multiple methods to calculate quartiles (Tukey, R-7, Excel, etc.), and different software uses different methods. Learn more about quartile software differences and how to choose the right method.

Q: How do I calculate quartiles in Excel?

A: Excel has several quartile functions: QUARTILE.INC and QUARTILE.EXC. Use QUARTILE.INC(data, 1) for Q1, QUARTILE.INC(data, 2) for Q2, and QUARTILE.INC(data, 3) for Q3. Note that Excel's method may differ from other software.

Q: What's the formula for IQR?

A: IQR = Q3 - Q1. It's simply the difference between the third and first quartiles, representing the spread of the middle 50% of your data.

Q: Can I use PlotNerd to calculate quartiles?

A: Yes! PlotNerd supports multiple quartile calculation methods (Tukey, R-7, Excel, WolframAlpha). Simply enter your data and choose your preferred method. You can also compare results across different methods.

8. Conclusion

Quartiles are fundamental statistical measures that help you understand data distribution. They divide your data into four equal parts, making it easy to see where your data is concentrated and how it's spread out.

Key takeaways:

  • Q1, Q2, Q3 divide data into four equal parts
  • Q2 is the median (50th percentile)
  • IQR = Q3 - Q1 measures the spread of the middle 50%
  • IQR is used for outlier detection (1.5Γ—IQR rule)
  • Different software may use different methods to calculate quartiles

Ready to calculate quartiles for your data? Try PlotNerd's quartile calculator to calculate quartiles using multiple methods and visualize your data with box plots.

Ready to Calculate Quartiles?

Use PlotNerd's free quartile calculator to calculate Q1, Q2, Q3, and IQR for your data.

Calculate Quartiles Now

πŸ”¬ Compare Methods with Your Data

Use our Interactive Guide to Quartile Calculation Discrepancies to see how different methods calculate quartiles with your own data, complete with step-by-step calculations and visual comparisons.

Open Interactive Guide β†’

πŸ“– Related Articles

πŸ”— See Also