Math

Grouped Data Mean, Median and Mode

Find the mean, median and mode of grouped data from class intervals and frequencies, with the working set out as in school textbooks.

Rules last checked 25 October 2026Every step shown

Your numbers are saved in this browser.

Each line: the class (lower-upper) then its frequency, e.g. “10-20 8”.

Mean

24

Median
24.6667
Mode
25.8333
Total frequency
40

For grouped data with 40 values, the mean is 24, the median 24.67 and the mode 25.83.

How it's worked out

  1. MeanΣ(frequency × midpoint) ÷ Σ frequency24
  2. Median classthe class holding the 20th value20–30
  3. MedianL + ((N ÷ 2 − cf) ÷ f) × h24.6667
  4. ModeL + ((f₁ − f₀) ÷ (2f₁ − f₀ − f₂)) × h25.8333
Working
ClassfMidpointf × midpoint
0–105525
10–20815120
20–301525375
30–401035350
40–5024590

The formulas

Mean = Σfx ÷ Σf · Median = L + ((N/2 − cf) ÷ f) × h · Mode = L + ((f₁ − f₀) ÷ (2f₁ − f₀ − f₂)) × h

Worked example

For classes 0–10 (5), 10–20 (8), 20–30 (15), 30–40 (10) and 40–50 (2): the mean is 960 ÷ 40 = 24, the median 20 + (7 ÷ 15) × 10 = 24.67, and the mode 20 + (7 ÷ 12) × 10 = 25.83.

Questions people ask

How do I find the mean of grouped data?

Multiply each class midpoint by its frequency, add them, and divide by the total frequency.

What is the formula for the median of grouped data?

L + ((N ÷ 2 − cf) ÷ f) × h, where L is the median class's lower limit, cf the cumulative frequency before it, f its frequency and h its width.

What is the formula for the mode?

L + ((f₁ − f₀) ÷ (2f₁ − f₀ − f₂)) × h, using the modal class and the classes either side.

About this calculator

Formula and rules last checked 25 October 2026Written and tested by the CalculatorDex teamReport a problem