The grouped data standard deviation calculator above works from a frequency table of class intervals rather than a list of individual values. You type the lower bound, upper bound and frequency of each class, and it returns the estimated mean, variance and standard deviation using the midpoint of each class as a stand-in for every observation that fell into it. That substitution is the entire method, and it is also the entire limitation: the result is an approximation whose accuracy depends on how the real values are spread inside each interval.
Arb Digital publishes this page because a very large share of the data people actually meet arrives pre-grouped. Published survey results, census tables, exported analytics reports, salary bands, age brackets and web-session duration buckets are all handed over as counts per range with the raw rows discarded. You cannot run a standard deviation on data you do not have, so the grouped estimate is not a shortcut — it is often the only calculation available. What matters is knowing how far off it can be, and this tool is built to make that visible rather than hide it.
What This Grouped Data Standard Deviation Calculator Does
It takes a table of classes and frequencies and computes three estimates: the mean, the variance and the standard deviation. It also reports the total frequency, the coefficient of variation, and a bar breakdown so you can see the shape of the distribution you are summarising. Both the sample form, dividing by n minus one, and the population form, dividing by n, are available, along with the optional Sheppard's correction for grouping bias.
That is deliberately a different job from two tools already on the site. Our standard deviation calculator and our descriptive statistics calculator both need the raw observations; given those, they return exact answers with no approximation involved. Our frequency distribution calculator goes the other direction, taking raw values and building the class table for you. This page is for the case where nobody can hand you the raw values at all, and where the honest output is therefore an estimate with a stated assumption attached. If you still have the original numbers, use the raw-data tools — they will always be more accurate than this one.
How to Use It
- Type one class per line. Lower bound, upper bound, frequency. The parser accepts commas, spaces, semicolons or a hyphen between the bounds, so pasting a table from a report usually works without cleanup.
- Check the bounds are continuous. If your source uses discrete brackets such as 10-19 and 20-29, convert them to boundaries of 9.5 to 19.5 and 19.5 to 29.5 before entering them, or the midpoints will sit half a unit low.
- Choose sample or population. Sample is the right default for survey data and anything drawn from a wider group. Population applies only when the table genuinely covers everyone.
- Decide on Sheppard's correction. Leave it off unless your classes are equal width and the underlying distribution tapers smoothly at both ends. It is a refinement, not a fix.
- Read the standard deviation with the mean beside it. A spread of 12 means something different on a mean of 26 than on a mean of 2,600, which is why the coefficient of variation is shown as well.
The Formula and How It's Calculated
Each class is collapsed to its midpoint, x = (lower + upper) ÷ 2, and treated as if every one of its f observations sat exactly there. The estimated mean is then the frequency-weighted average, x̄ = Σ(f·x) ÷ Σf. The variance uses the same weighting on squared deviations, which is computed here in the numerically convenient raw-moment form: Σ(f·x²) − (Σf·x)² ÷ n, divided by n − 1 for a sample or by n for a population. The standard deviation is the square root of that.
Run the default table by hand. Midpoints are 5, 15, 25, 35 and 45 with frequencies 4, 8, 12, 10 and 6, so n is 40. The weighted sum Σ(f·x) is 20 + 120 + 300 + 350 + 270 = 1,060, giving an estimated mean of 26.5. The sum of f·x² is 100 + 1,800 + 7,500 + 12,250 + 12,150 = 33,800. Subtract 1,060² ÷ 40 = 28,090 and you are left with 5,710. Divide by 39 for the sample variance, 146.41, whose square root is a standard deviation of about 12.10. Divide instead by 40 for the population figures: variance 142.75 and standard deviation 11.95. Those are exactly the numbers the tool prints on load.
The NIST/SEMATECH e-Handbook section on measures of scale sets out why the standard deviation weights distant values so heavily — every deviation is squared before averaging — which is precisely why the midpoint assumption matters more for spread than it does for the mean.
Why the Midpoint Assumption Bites the Variance Harder Than the Mean
Errors in the midpoint assumption tend to cancel out in the mean and tend to accumulate in the variance, and the reason is the squaring. If values inside a class sit slightly above its midpoint in some classes and slightly below in others, the weighted average barely moves — the two errors offset. The variance has no such mercy. Replacing a spread-out class with a single point removes all the within-class variation, so the grouped variance systematically understates the true variance whenever classes are wide.
The size of that understatement scales with the square of the class width. Doubling your class width roughly quadruples the amount of variation you have hidden. This is the practical argument for narrow classes when you have any say in how a table is built: a table with twelve classes over the same range will produce a materially better variance estimate than one with four, even though both give a similar mean. If you are designing the buckets yourself rather than inheriting them, our frequency distribution calculator will build them from the raw data and let you compare widths.
Sheppard's Correction, and When Not to Use It
Sheppard's correction is a classical adjustment that subtracts h² ÷ 12 from the grouped variance, where h is the common class width. The reasoning is that if observations are spread uniformly across a class of width h, the variance you destroyed by collapsing them to a point is the variance of a uniform distribution over that width, which is exactly h² ÷ 12. On the default table h is 10, so the correction removes 8.33 from the variance — a drop from 146.41 to 138.08 and a standard deviation of about 11.75.
It is not a free improvement. The correction assumes equal class widths, a distribution that tapers smoothly toward zero at both ends, and classes narrow enough relative to the spread that the smooth-taper argument holds. Applied to a table with open-ended or unequal classes, a strongly skewed distribution, or a hard boundary such as a value that cannot go below zero, it can easily make the estimate worse rather than better. The tool disables the correction automatically when class widths are unequal, and the safe default in most reporting work is to leave it off and describe the result as an unadjusted grouped estimate.
Open-Ended Classes: the Problem With "60 and Over"
Published tables very often end with a class that has no upper bound — "£100,000 or more", "65 and over", "10+ sessions". There is no midpoint for a class with no upper edge, so the calculation strictly cannot proceed. The standard workaround is to close the class artificially, usually by giving it the same width as its neighbour, and that choice is a genuine judgement call rather than arithmetic.
It also has real consequences. Income, session duration and wealth distributions all have long right tails, so the observations in that final open class are usually concentrated near its lower edge with a small number stretching far out. Closing it at the neighbour's width will typically place its midpoint too high, dragging the estimated mean up and, because the deviations are squared, dragging the estimated standard deviation up more. The defensible practice is to state the assumed upper bound alongside the result, and to re-run the calculation with a second plausible bound so you can quote how much the answer moves. If the conclusion changes between the two runs, the honest report is a range, not a point estimate.
Reading the Coefficient of Variation
The coefficient of variation is the standard deviation divided by the mean, expressed as a percentage. It answers a question the raw standard deviation cannot: is this spread large relative to the size of the thing being measured? On the default table it is about 45.7%, which says the typical deviation is close to half the average value — a genuinely wide distribution. The same standard deviation of 12.10 against a mean of 500 would be a coefficient of 2.4%, describing a tightly clustered set.
Two cautions apply. The measure is meaningless when the mean is near zero, because a tiny denominator inflates it without limit, and it is meaningless for data on an interval scale with an arbitrary zero, such as temperature in Celsius. It works properly on ratio-scale quantities — counts, durations, distances, money — where zero means genuinely none. For comparing an individual value's position within the distribution rather than the spread of the whole thing, our z-score calculator is the right instrument.
Where Grouped Estimates Are Good Enough
The approximation deserves more credit than it usually gets. When classes are reasonably narrow relative to the total range, when frequencies are large, and when the distribution inside each class is not wildly lopsided, the grouped standard deviation typically lands within a few percent of the raw-data answer. For descriptive reporting, for sanity-checking a figure someone else has quoted, or for feeding a rough spread into a planning model, that is entirely adequate.
The place to stop is inferential work. A formal hypothesis test, a confidence interval quoted to two decimal places, or any published finding that hinges on the exact value of the spread should not rest on midpoints if the raw data exists anywhere. Penn State's open STAT 500 applied statistics notes work through the estimation machinery that assumes you have the underlying observations, and the assumptions behind those procedures are about the data itself, not about a summary of it. If you are going to test something, chase the raw file first.
Arb Digital's analysts rebuild the measurement layer so your numbers come from source data rather than from someone else's summary table.
Browse All Free Tools Talk To Our TeamCommon Mistakes to Avoid
- Using discrete brackets as if they were continuous — a class written 10-19 on integer data really spans 9.5 to 19.5, and using 10 to 19 puts every midpoint half a unit too low.
- Dividing by n when the table is a sample — the population formula understates the spread of a sample, and survey tables are almost always samples.
- Applying Sheppard's correction to unequal or open classes — the correction assumes one common class width and a smoothly tapering distribution, and outside those conditions it adds error.
- Quoting the answer as exact — it is an estimate built on a midpoint assumption, and presenting it to four decimal places implies a precision the method does not have.
- Ignoring an open-ended top class — silently closing it at an arbitrary width can move both the mean and the standard deviation substantially, so the assumed bound belongs in the write-up.
Related Free Tools From Arb Digital
Compute the exact figure when you have every value with the standard deviation calculator, get the full summary set with the descriptive statistics calculator, build the class table itself with the frequency distribution calculator, isolate the squared-deviation step with the variance calculator, or convert shares of a total with the relative frequency calculator. Every statistics tool we publish is listed on the free online tools hub.
Frequently Asked Questions
Replace each class with its midpoint, weight the midpoints by their frequencies to get the mean, then take the frequency-weighted average of the squared deviations from that mean and square-root it. Divide by n minus one for a sample and by n for a population.
No. It is an estimate, because collapsing every class to a single midpoint discards the variation of values inside that class. It is usually close when classes are narrow and it drifts further from the truth as classes get wider.
Because the within-class spread has been removed. Every observation in a class is treated as sitting exactly on the midpoint, so the variation that existed across the width of the class contributes nothing to the variance.
An adjustment that subtracts the class width squared divided by twelve from the grouped variance, on the reasoning that a uniform spread across a class of that width has exactly that variance. It requires equal class widths and a smoothly tapering distribution.
You have to close it with an assumed upper bound, commonly by matching the width of the previous class. State the bound you chose and re-run with a second plausible value, because long-tailed data is sensitive to that choice.
Use the sample form whenever the table summarises a subset drawn from a larger group, which covers most survey and analytics data. Use the population form only when the table counts every member of the group you are describing.
No, the mean and variance calculation works with unequal widths. Sheppard's correction does not, and this tool switches it off automatically when it detects that the widths differ.
This page explains a statistical estimation method for educational purposes only. Grouped results are approximations, and any figure intended for publication or decision-making should be checked against the original observations where those are available.