Statistics

Grouped Data Median: How to Estimate It From Class Intervals

Estimate a grouped median with cumulative frequencies and interpolation. Identify the median class, use correct boundaries and explain the uncertainty. This guide explains the reasoning, not just the keystrokes.

Published · Updated · 4 min read

Use a sensitivity check inside the median class

Imagine that the eight observations in the second class were all near its lower end. The middle raw ranks would lie near that cluster even though the interpolation estimate stays unchanged. Move those observations near the upper end and the raw median moves again. This thought experiment demonstrates why an interval summary supports a range and a model-based estimate rather than an exact recovered observation. Report the class alongside the estimate when the underlying measurements have been discarded.

Do not confuse the median class with the modal class. The modal class has the highest frequency under a stated comparison, while the median class is identified through cumulative ranks. Unequal widths add another complication when interpreting a histogram's height. None of those graphical choices changes the need to identify the relevant cumulative half-count for median interpolation. Preserve the original frequency table rather than attempting to reconstruct counts from rounded bar heights.

Why an interval table loses the exact median

A class interval tells you how many observations fall in a range, not where each observation lies inside it. You can locate the middle part of the distribution, but generally cannot recover its exact raw-data median. A grouped median uses interpolation to estimate that position. Label it an estimate. An exact-value frequency table, where a row means precisely 12 rather than any value from 10 to 20, is a different problem.

Build cumulative frequencies

Consider classes 0 to below 10, 10 to below 20, 20 to below 30 and 30 to below 40, with frequencies 4, 8, 6 and 2. Total N is 20. Cumulative frequencies are 4, 12, 18 and 20. Half the observations correspond to cumulative count 10, which is reached inside the second class. That class, 10 to below 20, is the median class for this interpolation.

Original grouped distribution
ClassFrequencyCumulative frequency
0 ≤ x < 1044
10 ≤ x < 20812
20 ≤ x < 30618
30 ≤ x < 40220

Interpolation uses N/2=10 and the second class; exact raw-data central values are unknown.

Apply the interpolation formula

Use estimated median = L + ((N/2 − C)/f) × h. Here L is the median-class lower boundary, C is cumulative frequency before that class, f is its frequency and h is its width. Our inputs are L=10, C=4, f=8 and h=10. The estimate is 10 + ((10−4)/8) × 10 = 17.5. This locates the point three-quarters through the median class under a linear cumulative-frequency assumption.

Understand what the assumption means

Interpolation treats cumulative frequency as increasing linearly through the selected class, as though observations were spread evenly enough within it for that approximation. The table does not prove this. Eight observations clustered near 11 can produce the same frequencies as eight clustered near 19. The exact medians can therefore differ while the grouped estimate stays 17.5. Do not attach decimal precision to the estimate as evidence of equally precise underlying information.

Use boundaries rather than unexplained labels

For continuous half-open classes, the stated limits already supply boundaries. For data rounded to whole units and printed as 10–19, 20–29, continuity boundaries might instead be 9.5, 19.5 and 29.5 if that convention matches the recording process. Do not subtract 0.5 mechanically from every table. Class widths can vary: use the selected median class's width, not a neighboring width or an average width across the table.

Handle boundary and open-ended cases

If N/2 lands exactly at a cumulative class boundary, linear interpolation reaches that boundary from the preceding class. That is an interpolation result, not proof of the even-sample raw median. Empty classes cannot supply a divisor f=0. An open-ended median class has no finite stated width, so this formula lacks required information. Report the identifiable class or boundary and the missing assumption rather than inventing an upper endpoint.

Keep the calculator's input interpretation clear

The Median and Mode Calculator expects raw numerical observations. It does not accept an interval-frequency table or perform this interpolation. Entering class midpoints once each would discard frequencies; repeating midpoints by frequency creates a surrogate data set, not the original values. For this example, repeated midpoints yield a median of 15, which differs from 17.5. Use a separate calculation for the grouped estimate and keep its method named.

Report the estimate with useful limits

Write estimated median 17.5, using linear interpolation in class 10 to below 20, N=20. Include boundaries, frequencies and the formula so the result can be checked. Recover raw observations if an exact median is required. Narrower classes can reduce lost location information but cannot make interpolation exact automatically. Where only broad or open-ended categories are available, an honest interval-based statement can be more useful than a falsely exact single number.

Frequently asked questions

Is 17.5 an exact median?

It is an interpolation estimate based on the stated class assumptions.

Can I just take the median of midpoints?

That answers a different surrogate-data question and can disagree with grouped interpolation.

What if class widths differ?

Use the width of the identified median class.

Can the tool accept grouped intervals?

No. It expects raw values; calculate interval interpolation separately.

Sources

References used to support definitions and interpretation in this guide.

  1. OpenStax — Measures of Center
  2. Mississippi College — Grouped Data