Grouped Data Calculator
Use this when your data is already sorted into class intervals. Enter low-high:frequency pairs and the calculator works from the class midpoints.
New to this format?
Calculator
Results
Enter your numbers, then press Calculate.
Your mean, median and mode appear here, together with the working, the frequency table and the advanced statistics.
Frequency table
Advanced statistics
Step by step
Saved calculations
History is stored only in this browser. Nothing is sent to our server, and Clear history removes it.
Results are for educational purposes. Please verify important calculations. Read the disclaimer, the privacy policy and the guide to how to use the calculator.
What is grouped data?
Grouped data is data that has been sorted into class intervals, such as 0–10, 10–20 and 20–30. Each class has a frequency, which tells you how many values fall inside it. You cannot see the exact values, so the mean, median and mode of grouped data are estimates.
What is a class midpoint?
The class midpoint is the middle of a class. Add the lower limit and the upper limit, then divide by 2. For the class 10–20, the midpoint is (10 + 20) ÷ 2 = 15. We use the midpoint to stand in for every value in that class.
What are the formulas for mean, median and mode of grouped data?
To find mean median mode for grouped data, use the class midpoints for the mean, the class that holds the middle value for the median, and the class with the highest frequency for the mode. The three formulas are below, and every symbol is explained after them.
Mean = Σ(f × x) / Σf
Median = L + [(N/2 − cf) / f] × h
Mode = L + [(f1 − f0) / (2f1 − f0 − f2)] × h
- x is the class midpoint. f is the frequency of a class (in the median formula, the median class). Σ means add up.
- N is the total frequency, which is Σf.
- L is the lower limit of the median class, or of the modal class. h is the class width.
- cf is the cumulative frequency of the class before the median class.
- f1 is the frequency of the modal class. f0 and f2 are the frequencies of the classes before and after it.
This calculator shows the estimated mean, the median and the modal class. Use the mode formula by hand to estimate the mode inside that class.
How do I solve a grouped data example?
Take four classes: 0–10 with frequency 5, 10–20 with 8, 20–30 with 12 and 30–40 with 5. The total frequency N is 30. Fill in the table below first, with a column for the cumulative frequency. Then put the totals into the three formulas.
| Class | Frequency f | Midpoint x | f × x | Cumulative frequency |
|---|---|---|---|---|
| 0–10 | 5 | 5 | 25 | 5 |
| 10–20 | 8 | 15 | 120 | 13 |
| 20–30 | 12 | 25 | 300 | 25 |
| 30–40 | 5 | 35 | 175 | 30 |
| Total | 30 | 620 |
Mean: Σ(f × x) / Σf = 620 / 30 ≈ 20.67.
Median: N/2 = 15. The running total reaches 25 in the class 20–30, so this is the median class. L = 20, cf = 13, f = 12 and h = 10. Median = 20 + [(15 − 13) / 12] × 10 ≈ 21.67.
Mode: The highest frequency is 12, so the modal class is 20–30. L = 20, f1 = 12, f0 = 8, f2 = 5 and h = 10. Mode = 20 + [(12 − 8) / (24 − 8 − 5)] × 10 ≈ 23.64.
Which grouped data results are exact and which are estimates?
The counts are exact: each class frequency, the total frequency N and the cumulative frequencies. The class midpoints are exact too, because they come straight from the class limits. The mean, the median, the quartiles, the standard deviation and the mode are estimates, because the real values inside each class are not known.
In the example above, the estimated mean is 20.67 and the estimated median is 21.67. If you had the original 30 values, their true mean and median could be a little different. Narrower classes usually give estimates that are closer to the truth.
How do I enter grouped data in this calculator?
Type each class as low-high:frequency and separate the classes with commas, like 0-10:5, 10-20:8, 20-30:12, 30-40:5. Then press the calculate button. You do not need to find the midpoints yourself. The calculator shows the midpoints, the estimated mean, the median and the modal class.
What mistakes should I avoid with grouped data?
The most common mistakes are using the class limits instead of the midpoint, forgetting to multiply by the frequency and choosing the wrong median class. Small slips like these change the answer, so check each one before you trust your result.
Frequently asked questions about grouped data
Is the mean of grouped data exact?
No. It is an estimate, because the exact values inside each class are not known. The calculator treats every value in a class as if it sat at the midpoint.
What if my classes have different widths?
The midpoint and median steps still work, because each class uses its own width. The mode formula works best when all the classes have the same width.
What if two classes have the same highest frequency?
Then the data has two modal classes, which is called bimodal. The calculator reports the first modal class it finds, the first one in your table, so work out the other one by hand with the mode formula. The mode formula guide has more on the mode.
What does cumulative frequency mean?
Cumulative frequency is a running total. Add each class frequency to the total of the classes before it. The last cumulative frequency is equal to N.
Can I use this calculator for a plain list of numbers?
You can, but the mean, median, mode and range calculator is built for that. Use this page when your data is already sorted into class intervals.
Next, try the frequency table calculator, read the mean vs median vs mode guide or practise with the statistics practice questions.
Last updated:
Other calculators
For extra study, see the grouped data worksheet questions.
How are these results calculated?
The calculator uses the median-of-halves method for quartiles. For an odd number of values, the middle value is included in both halves. Percentiles use linear interpolation with position (p ÷ 100) × (n − 1). Other tools may use different rules.
Method and references
For an independent explanation of statistical methods, see the NIST/SEMATECH e-Handbook of Statistical Methods. This is a reference for general methods, not a claim of endorsement or external review. Check the calculator’s displayed steps for the exact operation used.