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_v

IQR

iqr = q3_v - q1_v

Lower 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

VariableDescriptionDefault
min_vMinimum5
q1_vQ1 (25th Percentile)15
med_vMedian (Q2)30
q3_vQ3 (75th Percentile)45
max_vMaximum80

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
  1. 01Five-Number Summary: 5, 15, 30, 45, 80
  2. 02Range = 80 - 5 = 75
  3. 03IQR = 45 - 15 = 30
  4. 04Lower Fence = 15 - 1.5*30 = 15 - 45 = -30
  5. 05Upper Fence = 45 + 1.5*30 = 45 + 45 = 90

Ready to run the numbers?

Open Five-Number Summary Calculator