Interquartile Range Calculator

An interquartile range calculator identifies the spread of the middle 50% of values in a dataset.

How to calculate the interquartile range:

The IQR measures statistical dispersion by capturing the range between the first and third quartiles, making it resistant to outliers.

Step-by-step method:

  1. List all values in the dataset
  2. Sort the values in ascending order
  3. Find the median — this splits the dataset into a lower half and an upper half
  4. Find Q1 — the median of the lower half
  5. Find Q3 — the median of the upper half
  6. Subtract: IQR = Q3 − Q1

Formula:

IQR = Q3 − Q1

Where Q1 is the 25th percentile and Q3 is the 75th percentile of the dataset.

Examples

Example 1: Dataset {1, 3, 5, 7, 9}

  • Sorted: 1, 3, 5, 7, 9
  • Median = 5 → lower half = {1, 3}, upper half = {7, 9}
  • Q1 = (1+3) / 2 = 2, Q3 = (7+9) / 2 = 8
  • IQR = 8 − 2 = 6.0000

Example 2: Dataset {2, 4, 4, 5, 6, 7, 8, 9}

  • Sorted: 2, 4, 4, 5, 6, 7, 8, 9
  • Median = (5+6) / 2 = 5.5 → lower half = {2, 4, 4, 5}, upper half = {6, 7, 8, 9}
  • Q1 = (4+4) / 2 = 4, Q3 = (7+8) / 2 = 7.5
  • IQR = 7.5 − 4 = 3.5000

Key features include:

  • Input for up to 50 values
  • Automatic calculation
  • Displays Q1, Median, Q3, and IQR together
  • Flexible list management — add or remove values freely
  • Support for decimals and negative numbers
  • Dynamic recalculation on every change