Five-Number Summary Calculator Formula
Understand the math behind the five-number summary calculator. Each variable explained with a worked example.
Formulas Used
Range
range = max_v - min_vIQR
iqr = q3_v - q1_vLower Whisker Fence
lower_fence = q1_v - 1.5 * (q3_v - q1_v)Upper Whisker Fence
upper_fence = q3_v + 1.5 * (q3_v - q1_v)Variables
| Variable | Description | Default |
|---|---|---|
min_v | Minimum | 5 |
q1_v | Q1 (25th Percentile) | 15 |
med_v | Median (Q2) | 30 |
q3_v | Q3 (75th Percentile) | 45 |
max_v | Maximum | 80 |
How It Works
Five-Number Summary
Components
1. Minimum: Smallest observation 2. Q1: First quartile (25th percentile) 3. Median: Middle value (50th percentile) 4. Q3: Third quartile (75th percentile) 5. Maximum: Largest observation
These five values provide a quick sketch of the data distribution and form the basis for box-and-whisker plots. The whisker fences at Q1 - 1.5*IQR and Q3 + 1.5*IQR mark the boundary for potential outliers.
Worked Example
A dataset has min=5, Q1=15, median=30, Q3=45, max=80.
min_v = 5q1_v = 15med_v = 30q3_v = 45max_v = 80
- 01Five-Number Summary: 5, 15, 30, 45, 80
- 02Range = 80 - 5 = 75
- 03IQR = 45 - 15 = 30
- 04Lower Fence = 15 - 1.5*30 = 15 - 45 = -30
- 05Upper Fence = 45 + 1.5*30 = 45 + 45 = 90
Ready to run the numbers?
Open Five-Number Summary Calculator