Quartile Deviation Calculator

Enter your numbers separated by commas or spaces.

How it is calculated

The values are split on commas and spaces, checked to be numbers (anything else gives no result), and sorted. At least four values are needed. Quartiles use linear interpolation: the position is rank = p × (n − 1) counting from zero, with p = 0.25 for Q1 and 0.75 for Q3. If the rank falls between two sorted values, Q = xlo + (xhi − xlo) × fraction. This is the same method as Excel's QUARTILE.INC and NumPy's default; other textbook methods (median-of-halves, for example) can give slightly different Q1 and Q3. Then IQR = Q3 − Q1 and QD = IQR / 2. Results are shown to four decimals in the same unit as your data.

Worked example

Data: 21, 4, 15, 7, 12, 25, 9, 18. Sorted: 4, 7, 9, 12, 15, 18, 21, 25, so n = 8. Q1 rank = 0.25 × 7 = 1.75, between 7 and 9: 7 + (9 − 7) × 0.75 = 8.5. Q3 rank = 0.75 × 7 = 5.25, between 18 and 21: 18 + (21 − 18) × 0.25 = 18.75. IQR = 18.75 − 8.5 = 10.25. Quartile deviation = 10.25 / 2 = 5.1250.

Try this example →

Common mistakes

  • Using a decimal comma in the data. A comma-only list such as 2,5,3,5 is read as four numbers; a decimal comma works only when entries are separated by spaces or semicolons, as in 2,5 3,5. Write decimals with a point.
  • Separating numbers with other symbols; the list is read with commas, semicolons, spaces and line breaks, and any other character gives no result.
  • Entering fewer than four numbers. Quartiles need at least four values, so smaller sets return nothing.
  • Comparing the result with a textbook answer computed by the median-of-halves method. For small samples that method can give a different Q1 and Q3 than interpolation.
  • Reporting the IQR as the quartile deviation. The quartile deviation is half the IQR.

About this calculator

Quartiles split a sorted data set into four equal parts: Q1 (25th percentile), the median (Q2), and Q3 (75th percentile). The interquartile range (IQR) is Q3 minus Q1 — the spread of the middle 50% of the data — and the quartile deviation (QD), also called the semi-interquartile range, is simply IQR divided by 2.

Because it only looks at the middle half of the data, QD is much less sensitive to extreme outliers than the standard deviation, which makes it a favorite in descriptive statistics for summarizing skewed distributions — income data, exam scores, or reaction times — where a few extreme values would otherwise distort a mean-based spread measure.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    The quartile deviation uses only the middle half of the data, so a single extreme value barely moves it, unlike a standard deviation. Try it: add one huge number to your list and see how little Q1 and Q3 change. Compare it with the median to judge how spread out the typical values are. Post a small data set and the answer your textbook gives if your quartiles differ from this tool's.

Popular calculators

All Calculators