How it’s calculated
When data come as a frequency table of classes (for example 11–20 minutes: 14 people), the individual values are unknown, so the mean, median, mode and standard deviation can only be estimated. The usual method treats every value in a class as sitting at the class midpoint for the mean and standard deviation, and spreads the values evenly across the class for the median and quartiles.
L is the lower class boundary of the class used, F the cumulative frequency before it, f its frequency and w its width. Δ1 and Δ2 are how much the modal class’s frequency exceeds the class before and after it. When classes have gaps, such as 1–10 and 11–20 for whole numbers, the boundary is halfway across the gap (10.5), so the class 11–20 runs from 10.5 to 20.5 and has width 10.
Example (University of Massachusetts lecture notes): travel times to work 1–10: 8, 11–20: 14, 21–30: 12, 31–40: 9, 41–50: 7, so n = 50. The cumulative frequencies are 8, 22, 34, 43, 50, so the median class is 21–30 (boundaries 20.5 to 30.5). Median = 20.5 + (25 − 22)/12 × 10 = 23. (The notes write L = 20.5 but then substitute 21.5, giving 24; 20.5 is correct.) Q1 = 10.5 + (12.5 − 8)/14 × 10 = 13.714, Q3 = 30.5 + (37.5 − 34)/9 × 10 = 34.389. The modal class is 11–20: mode = 10.5 + 6/(6 + 2) × 10 = 18 (the notes print 17.5, another arithmetic slip). With midpoints 5.5, 15.5, 25.5, 35.5 and 45.5, Σf·m = 1205, so the mean is 24.1. These are the default values.
Frequently asked questions
Why are the results only estimates?
A frequency table hides the actual values inside each class. The formulas assume values sit at the class midpoint (mean, standard deviation) or are spread evenly across the class (median, quartiles), so the answers are close to, but not exactly, what the raw data would give.
What are class boundaries?
They close the gaps between classes. For whole-number classes 1–10 and 11–20 the boundary is 10.5, so every possible value belongs to exactly one class. Interpolation uses boundaries and the class width measured between them.
Can I use classes like 0–10, 10–20?
Yes. When one class ends where the next begins, the boundaries are the limits themselves. Enter the classes in increasing order without overlaps.
What if two classes share the highest frequency?
Then there is no single modal class, and the calculator lists the classes instead of estimating one mode.
Embed this calculator
Add this free calculator to your own website. Copy the code below into your page’s HTML:
Need this calculator branded, changed or built around your own prices?See custom business solutions →
Sources
- Lecture 2: Grouped Data Calculation (mean, median, quartiles, mode, variance) — University of Massachusetts Amherst
- Introductory Statistics 2e, §2.7 Measures of the Spread of the Data (standard deviation of grouped frequency tables) — OpenStax
Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.
Added · Last updated · How we check our calculators
Spotted a mistake or missing option? Report a problem· Suggest a calculator