Live
Please enter at least 4 numbers to calculate quartiles.
Accepts commas, spaces, or line breaks between values. Minimum 4 numbers recommended.
Quartile Results
Sorted Data Set
📋 Step-by-Step Solution

Sources & Methodology

Quartile calculations follow the inclusive median method (Tukey's Method / Method 2) as defined in standard statistics textbooks and used by the majority of scientific calculators.
📖
Reference for the standard quartile calculation method taught in AP Statistics and high school math curricula worldwide.
🏫
Standards for statistical reasoning and data analysis in grades 6–12 used to verify the quartile method and IQR formula applied here.
📊
Academic reference for Tukey's fences (1.5 × IQR rule) used for outlier identification in this calculator.
Methodology: Data is sorted in ascending order. Q2 (median) = middle value for odd n, average of two middle values for even n. Q1 = median of the lower half (values at positions 1 to floor(n/2)). Q3 = median of the upper half (values at positions ceil(n/2)+1 to n for odd n, or n/2+1 to n for even n). IQR = Q3 − Q1. Outlier fences: Lower = Q1 − 1.5 × IQR; Upper = Q3 + 1.5 × IQR.
⏱ Last reviewed: March 2026

How to Calculate Quartiles — Formula & Step-by-Step Guide

Quartiles divide a sorted data set into four equal parts, each containing 25% of the values. They are a fundamental tool in descriptive statistics, used to summarize data distribution and identify outliers. The three quartile values (Q1, Q2, Q3) plus the minimum and maximum form the five-number summary that underlies every box-and-whisker plot.

The Quartile Formula — Step by Step

Step 1: Sort data in ascending order
Step 2: Q2 (Median) = middle value (or average of two middle values for even n)
Step 3: Q1 = median of the lower half of the data
Step 4: Q3 = median of the upper half of the data
Step 5: IQR = Q3 − Q1
Example with 8 values: {3, 7, 8, 12, 14, 18, 21, 25}
Q2 = (12 + 14) ÷ 2 = 13  |  Lower half: {3, 7, 8, 12} → Q1 = (7 + 8) ÷ 2 = 7.5
Upper half: {14, 18, 21, 25} → Q3 = (18 + 21) ÷ 2 = 19.5  |  IQR = 19.5 − 7.5 = 12

Quick Reference — What Each Quartile Means

MeasureSymbolPercentileMeaning
First QuartileQ125th25% of values fall at or below this point
Second Quartile (Median)Q250thHalf the data is above, half is below
Third QuartileQ375th75% of values fall at or below this point
Interquartile RangeIQR25th–75thMiddle 50% of the data; measures spread
Lower FenceQ1 − 1.5×IQRValues below this are potential outliers
Upper FenceQ3 + 1.5×IQRValues above this are potential outliers

Odd vs Even Data Sets — How the Method Differs

The quartile calculation differs slightly depending on whether your data set has an odd or even number of values. With an even number of values, split the data cleanly in half and find the median of each half. With an odd number, the median value itself is excluded from both halves before finding Q1 and Q3. Our calculator handles this automatically.

Data SetnQ1Q2Q3IQR
{2, 4, 6, 8, 10, 12}6 (even)47106
{1, 3, 5, 7, 9, 11, 13}7 (odd)37118
{10, 20, 30, 40, 50, 60, 70, 80}8 (even)25456540
{5, 10, 15, 20, 25, 30, 35, 40, 45}9 (odd)10254030

How to Find Outliers Using the IQR Method

Lower Fence = Q1 − (1.5 × IQR)
Upper Fence = Q3 + (1.5 × IQR)
Any value below the lower fence or above the upper fence is a suspected outlier.
Example: Q1 = 10, Q3 = 30, IQR = 20
Lower fence = 10 − (1.5 × 20) = 10 − 30 = −20
Upper fence = 30 + (1.5 × 20) = 30 + 30 = 60
Any value below −20 or above 60 is a potential outlier.

Real-World Applications of Quartiles

Quartiles are used in nearly every field that analyzes data. In finance, mutual funds are ranked in quartiles — a top-quartile fund outperformed 75% of its peers. In education, standardized test scores are reported in quartile bands. In medicine, growth charts and lab reference ranges use quartiles to define normal. In real estate, home prices are summarized using the IQR to show where most homes are priced. In data science, the IQR method is one of the most common techniques for detecting and removing outliers before model training.

💡 Quartiles vs Percentiles: Quartiles are simply named percentiles — Q1 = 25th percentile, Q2 = 50th percentile, Q3 = 75th percentile. The IQR (Q3 − Q1) represents the range of the middle 50% of data, making it far more robust than standard deviation for skewed or outlier-heavy distributions.
Frequently Asked Questions
Sort the data ascending. Q2 (median) is the middle value; for even counts, average the two middle values. Q1 is the median of the lower half of the data. Q3 is the median of the upper half. Enter your numbers above and the calculator shows every step automatically.
IQR = Q3 − Q1. The interquartile range represents the spread of the middle 50% of your data. A large IQR means data is more spread out; a small IQR means values are clustered. For example, if Q1 = 20 and Q3 = 50, IQR = 30, meaning the central half of your values fall within a 30-unit range.
Q1 is the first quartile — the value below which 25% of the data falls. It is also called the 25th percentile or lower quartile. In a box plot, Q1 marks the left edge of the box. Q1 is useful for understanding the lower distribution of your data and for setting the lower boundary of the outlier fence.
For an even data set, Q2 is the average of the two middle values. Then split the data into equal halves and find the median of each. For 8 values (positions 1-8): Q1 is the median of positions 1-4, Q3 is the median of positions 5-8. If each half has an even number of values, average those two middle values again.
Quartiles are used in finance (fund performance rankings), education (standardized test score percentile bands), medicine (growth charts and lab normal ranges), real estate (price distribution summaries), HR (salary benchmarking by quartile), and data science (IQR outlier removal before machine learning model training).
Compute IQR = Q3 − Q1. Lower fence = Q1 − 1.5 × IQR. Upper fence = Q3 + 1.5 × IQR. Any value below the lower fence or above the upper fence is flagged as a potential outlier (Tukey's fences method). This calculator shows fences and outliers automatically for every data set you enter.
Quartiles divide data into 4 groups; percentiles divide into 100 groups. They are directly related: Q1 = 25th percentile, Q2 = 50th percentile, Q3 = 75th percentile. Percentiles are more granular and are used when finer distinctions are needed, such as SAT score reporting or clinical growth charts.
This calculator uses the inclusive median method (Tukey's Method / Method 2), which is the most widely taught approach in high school and college statistics. For an odd number of values, the median is not included in either half when computing Q1 and Q3. This matches the output of most graphing calculators (TI-84) and statistics textbooks.
A box-and-whisker plot uses five values: minimum, Q1, Q2, Q3, and maximum. The box spans Q1 to Q3 (the IQR). The line inside the box is Q2 (median). Whiskers extend to the min and max (or to the inner fences if outliers are present). A box skewed to the left or right indicates skewed data distribution.
Technically yes, but the results become less statistically meaningful with fewer than 5–6 values. With 3 values, Q1 and Q3 may equal the minimum and maximum. Most textbooks and guidelines recommend at least 8–10 data points for quartile analysis to produce interpretable results. This calculator works with any size but will note when data is very small.
Related Calculators
Popular Calculators
🧮

Missing a Statistics Calculator?

Can’t find the statistics calculator you need? Tell us — we build new ones every week.