Quartile Calculator Formula
Understand the math behind the quartile calculator. Each variable explained with a worked example.
Formulas Used
Q1 (25th Percentile)
q1 = (v1 + v2) / 2Q2 (Median)
q2 = v3Q3 (75th Percentile)
q3 = (v4 + v5) / 2IQR (Q3 - Q1)
iqr = (v4 + v5) / 2 - (v1 + v2) / 2Variables
| Variable | Description | Default |
|---|---|---|
v1 | Value 1 (Min) | 10 |
v2 | Value 2 | 20 |
v3 | Value 3 | 30 |
v4 | Value 4 | 40 |
v5 | Value 5 (Max) | 50 |
How It Works
How to Compute Quartiles
Steps (for 5 sorted values)
1. Q2 (Median): The middle value (3rd of 5) 2. Q1: Median of the lower half (values 1 and 2), so Q1 = (v1 + v2) / 2 3. Q3: Median of the upper half (values 4 and 5), so Q3 = (v4 + v5) / 2
Quartiles divide the sorted dataset into four equal parts. Q1 separates the lowest 25%, Q2 is the median, and Q3 separates the lowest 75%.
Worked Example
Find the quartiles of the sorted dataset: 10, 20, 30, 40, 50.
v1 = 10v2 = 20v3 = 30v4 = 40v5 = 50
- 01Q2 (Median) = v3 = 30
- 02Lower half: 10, 20 → Q1 = (10 + 20) / 2 = 15
- 03Upper half: 40, 50 → Q3 = (40 + 50) / 2 = 45
- 04IQR = 45 - 15 = 30
Ready to run the numbers?
Open Quartile Calculator