⚡
usefultools.dev
Σf

Grouped Data Calculator

NEW

Enter class intervals and frequencies to get the mean, median, mode, quartiles, variance and standard deviation of grouped data, with a cumulative frequency table and the worked formulas.

Runs 100% in your browser — your input is never uploaded or stored on our servers.

Lower limitUpper limitFrequency (f)
Total frequency (N)
40
Mean
25.5
Median
25.8333
Mode
26.6667
First quartile (Q1)
16.25
Third quartile (Q3)
35
Interquartile range
18.75
Population variance (σ²)
144.75
Population SD (σ)
12.0312
Sample variance (s²)
148.4615
Sample SD (s)
12.1845
Cumulative frequency table
ClassBoundariesMidpoint (x)fCumulative fRelative %f·x
0 – 100 – 1055512.5%25
10 – 2010 – 201581320%120
20 – 3020 – 3025122530%300
30 – 4030 – 4035103525%350
40 – 5040 – 504554012.5%225
Total40100%1,020

The highlighted row is the modal class.

Worked formulas
x̄ = Σfx / N = 1,020 / 40 = 25.5
Me = L + (N/2 − CF) / f × h = 20 + (20 − 13) / 12 × 10 = 25.8333
Q1 = L + (N/4 − CF) / f × h = 10 + (10 − 5) / 8 × 10 = 16.25
Q3 = L + (3N/4 − CF) / f × h = 30 + (30 − 25) / 10 × 10 = 35
Mo = L + (f₁ − f₀) / ((f₁ − f₀) + (f₁ − f₂)) × h = 20 + (12 − 8) / ((12 − 8) + (12 − 10)) × 10 = 26.6667
σ² = Σf(x − x̄)² / N = 5,790 / 40 = 144.75
s² = Σf(x − x̄)² / (N − 1) = 5,790 / 39 = 148.4615

x = class midpoint, L = lower boundary of the class, CF = cumulative frequency before the class, f = frequency of the class, h = class width, f₀ and f₂ = frequencies (or densities for unequal widths) of the classes before and after the modal class; Me = median, Mo = mode.

⚡

Quick Examples

Typical inputs and the results this tool produces.

Equal widths
0-10:5, 10-20:8, 20-30:12, 30-40:10, 40-50:5
Mean 25.5, median 25.8333, mode 26.6667
Spread
0-10:5, 10-20:8, 20-30:12, 30-40:10, 40-50:5
Q1 16.25, Q3 35, σ 12.0312, s 12.1845
Gaps
10-19:3, 20-29:7, 30-39:10, 40-49:6, 50-59:4
Mean 34.8333, median 34.5, mode 33.7857
Unequal widths
0-10:10, 10-30:30, 30-60:15
Mean 24.0909, median 21.6667, mode 16.6667
📖

Overview

When data comes as a frequency table, such as ages in bands or exam marks in ranges, the individual values are lost and the usual formulas need the grouped versions. This calculator takes each class interval with its frequency and estimates the mean from the class midpoints, the median and quartiles by linear interpolation inside the class, and the mode with the grouped formula L + d₁ / (d₁ + d₂) × h.

It also gives the population and sample variance and standard deviation and builds the cumulative frequency table. Gaps such as 10–19 and 20–29 are closed with class boundaries, unequal widths use frequency density for the mode, and an open-ended class like 60+ gets a clear message asking for an assumed limit. Each result shows its formula with your numbers.

Why use this tool?

  • Mean, median, mode, quartiles and SD in one pass
  • Cumulative frequency table built for you
  • Handles gaps between classes and unequal widths
  • Sample and population variance side by side
  • Type a table or paste rows from a spreadsheet
⭐

Features

🧮

Grouped formulas

Mean from midpoints, median and quartiles by interpolation, and the mode from the modal class and its neighbours.

📊

Cumulative table

Class, boundaries, midpoint, frequency, cumulative frequency, relative frequency and f·x for every class, plus totals.

↔️

Gaps and widths

Classes with gaps get boundaries halfway between them; unequal widths are used per class and the mode switches to frequency density.

⚠️

Clear errors

Open-ended classes, overlapping intervals, negative frequencies and a zero total each get their own message.

📋

Paste from a sheet

Paste lines like 10-20 5 or tab-separated columns instead of typing every row.

📄

Copy the results

Copy all statistics and the frequency table as tab-separated text for a report or spreadsheet.

🛠️

How to Use

1

Enter the classes

Type the lower limit, upper limit and frequency of each class, or switch to Paste rows.

2

Check the messages

Fix any open-ended or overlapping class the tool points out.

3

Read the statistics

Mean, median, mode, quartiles, variance and standard deviation update as you type.

4

Review and copy

Check the cumulative table and worked formulas, then copy the results.

🤔

Frequently Asked Questions