Grouped Data Calculator: Mean, Median, Mode, Variance and SD from a Frequency Table
Type your class intervals and frequencies (for example “10-20 4”) and get the mean, median, mode, quartiles, variance and standard deviation of grouped data. The full working table (midpoints, fx, cumulative frequency) and every formula with your numbers are shown, just as you would write them in an exam.
- PriceFree, no login or sign-up needed
- Your dataCalculated in your browser; nothing is saved
- Works onPhone, tablet or computer, any modern browser
- Made byDr. Muhammad Aammar Tufail, Codanics
- Published24 November 2026
- Last updated24 November 2026
📚 How to cite this tool
This tool is free. If it helped your thesis, paper, report or assignment, please cite it. It keeps the tools free and helps other students find them.
Tufail, M. A. (2026). Grouped data calculator [Online tool]. Codanics. Retrieved 24 November 2026, from https://codanics.com/tools/grouped-data-calculator/
In-text citation: (Tufail, 2026) · Narrative: Tufail (2026)
The access date is today’s date, filled in automatically. Author: Muhammad Aammar Tufail. Published 24 November 2026.
How to use the grouped data calculator
- Type one class per line: lower limit, upper limit and frequency, for example
10-20 4. You can paste three columns from Excel. - Classes can be continuous (10–20, 20–30) or use stated limits (10–19, 20–29); the second kind is converted to class boundaries automatically.
- Read the mean, median, mode and SD at the top, then the working table and the formulas with your numbers.
- Choose the decimal places you need and press Copy result.
What is grouped data?
Grouped data are values summarised in a frequency table of class intervals, so the exact values are unknown and statistics are estimated from the class midpoints and boundaries. You meet grouped data in textbooks, survey reports and exam questions such as “the table shows the marks of 40 students”.
Formulas for grouped data
| Statistic | Formula |
|---|---|
| Mean | x̄ = Σfx ÷ Σf (x = class midpoint) |
| Median | L + ((n/2 − cf) ÷ f) × h |
| Mode | L + ((f₁ − f₀) ÷ (2f₁ − f₀ − f₂)) × h |
| Quartiles | as the median, using n/4 and 3n/4 |
| Variance | Σf(x − x̄)² ÷ n (population) or ÷ (n − 1) (sample) |
| Standard deviation | √variance |
L = lower boundary of the median (or modal) class, cf = cumulative frequency before that class, f = its frequency, h = class width, f₁ = frequency of the modal class, f₀ and f₂ = frequencies of the classes before and after it.
Worked example
Classes 10–20, 20–30, …, 60–70 with frequencies 4, 7, 12, 9, 5, 3 (n = 40).
- Mean: midpoints 15, 25, …, 65. Σfx = 1,530, so x̄ = 1,530 ÷ 40 = 38.25.
- Median: n/2 = 20. Cumulative frequencies 4, 11, 23… so the median class is 30–40. Median = 30 + ((20 − 11) ÷ 12) × 10 = 37.5.
- Mode: modal class 30–40 (f₁ = 12, f₀ = 7, f₂ = 9). Mode = 30 + (5 ÷ 8) × 10 = 36.25.
- SD: Σf(x − x̄)² = 7,477.5. Population variance = 186.94, SD = 13.67; sample variance = 191.73, SD = 13.85.
Common mistakes
- Using stated limits instead of boundaries. For classes 10–19, 20–29 the boundaries are 9.5–19.5, 19.5–29.5. Use the boundary as L in the median and mode formulas.
- Taking cf of the median class itself. In the median formula, cf is the cumulative frequency of the class before the median class.
- Forgetting these are estimates. Grouped results assume values are spread evenly within each class, so they differ slightly from the raw-data answers.
- Mixing n and n − 1. Many school textbooks divide by n; research reports usually use the sample SD (n − 1). Both are shown here.
Frequently asked questions
How do I find the mean of grouped data?
Find the midpoint x of each class, multiply by its frequency f, add up the fx values and divide by the total frequency: x̄ = Σfx ÷ Σf.
How do I find the median of grouped data?
Find n/2, locate the class where the cumulative frequency first reaches n/2, then use Median = L + ((n/2 − cf) ÷ f) × h, where cf is the cumulative frequency before that class.
What is the formula for the mode of grouped data?
Mode = L + ((f₁ − f₀) ÷ (2f₁ − f₀ − f₂)) × h, where f₁ is the frequency of the modal class and f₀, f₂ are the frequencies of the classes just before and after it.
How do I calculate the standard deviation of grouped data?
Compute f(x − x̄)² for each class, add them, divide by n (population) or n − 1 (sample), and take the square root. The shortcut is √((Σfx² − n·x̄²) ÷ n).
Why is the grouped mean different from the real mean?
Grouping hides the exact values, so each value is treated as if it were the class midpoint. The result is an estimate; it is usually close when classes are narrow.
Does this tool save my data?
No. Everything is calculated in your browser and nothing is saved or uploaded.
Do I need to log in or create an account to use the grouped data calculator?
No. There is no login, no sign-up and no email required. Open the page and start using it straight away, for free, on any device.
How do I cite this tool in my thesis or paper?
Use the citation box on this page. In APA 7th edition: Tufail, M. A. (2026). Grouped data calculator [Online tool]. Codanics. Retrieved [date you used it], from https://codanics.com/tools/grouped-data-calculator/. BibTeX, RIS (EndNote, Mendeley, Zotero), MLA, Harvard, Chicago and Vancouver formats are also available.
Free guides and courses from Codanics
More free tools
See all free Codanics tools → · Codanics on YouTube · WhatsApp channel