This calculator finds the mean and standard deviation of grouped or frequency data, where instead of a list of individual values you have categories or class intervals and how often each occurs. Data often arrives summarised this way: a frequency table of exam marks grouped into bands, ages grouped into ranges, or any survey where responses are tallied by category. To find the spread of such data you cannot simply use the raw values, because you only have the groups and their counts. The standard approach uses the midpoint of each class to represent its values, weights each midpoint by its frequency, and works the mean and standard deviation from those weighted figures. This tool does exactly that. You enter the class midpoints in one box and the matching frequencies in another, in the same order, and the calculator returns the sample standard deviation, the mean, the population standard deviation, and the total number of observations. The results update as you type. Use it for statistics homework involving frequency tables, for analysing survey or grouped data, or whenever your data comes as categories with counts rather than a raw list. The mean is the sum of each midpoint times its frequency, divided by the total frequency. The standard deviation measures how spread out the data is around that mean, using the squared deviations of the midpoints weighted by frequency. The calculator gives both the sample standard deviation, which divides by one less than the total count and is used when your data is a sample, and the population version, which divides by the full count. Because midpoints stand in for the actual values within each class, grouped statistics are an approximation, very good when classes are reasonably narrow and the data is evenly spread within them.
Uses class midpoints weighted by frequency. Mean = sum(f x) / sum(f). Sample SD divides by n - 1; population SD by n. An approximation since midpoints stand in for values.
Each class midpoint is multiplied by its frequency and summed, then divided by the total frequency to get the mean. The standard deviation comes from the squared difference of each midpoint from the mean, weighted by frequency and summed; dividing by one less than the total count and taking the square root gives the sample standard deviation, while dividing by the total count gives the population version.
For midpoints 5, 15, 25, 35, 45 with frequencies 2, 5, 8, 3, 2, the total count is 20 and the weighted sum is 480, so the mean is 24. The weighted squared deviations sum to 2,380, so the population standard deviation is the square root of 2,380 over 20, about 10.91, and the sample standard deviation, dividing by 19, is about 11.19.
If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.
Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.
All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.
Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.
Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.
Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.
All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.
© 2019 to 2026 Calculate.co.nz. All rights reserved.