Mean & Standard Deviation from a Frequency Distribution
Just enter your class midpoints and frequencies to instantly get the mean (weighted average), variance, and standard deviation of a frequency distribution table. See both population and sample values, plus a full x×f breakdown.
Input
Enter one "class midpoint, frequency" pair per line. Separate them with a space, comma, or tab (e.g. 30, 8).
Result
Mean (weighted average)
28.5
Standard deviation (population)
10.14
Variance (population)
102.75
Total frequency
20
Sample standard deviation
10.4
Sample variance
108.16
Calculation breakdown
| Midpoint x | Frequency f | x × f | f(x − mean)² |
|---|---|---|---|
| 10 | 2 | 20 | 684.5 |
| 20 | 5 | 100 | 361.25 |
| 30 | 8 | 240 | 18 |
| 40 | 4 | 160 | 529 |
| 50 | 1 | 50 | 462.25 |
| Total | 20 | 570 | 2,055 |
How it works
- Enter one "class midpoint, frequency" pair per line. You can separate the values with a space, comma, or tab, and any line that does not contain two numbers is ignored automatically.
- The mean (weighted average) is Σ(class midpoint × frequency) ÷ Σ(frequency). Each class midpoint is weighted by its frequency before summing.
- The variance is Σ{frequency × (class midpoint − mean)²} divided by the total frequency (the population variance, also called the sample variance in statistics). The standard deviation is the square root of that variance.
- The unbiased variance and standard deviation divide by the total frequency minus one (n−1). Use these when you treat your data as a sample used to estimate the whole population. They cannot be computed when the total frequency is 1.
- The class midpoint is usually the center of each class (for example, 15 for a class of 10 up to 20). Because results depend on how classes are defined, the mean and standard deviation are approximations.
- Results are shown to roughly two decimal places. The breakdown table lets you check each x×f and f(x−mean)² row along with the totals.
Related calculators
Flash Shooting Distance
HobbyCalculate the ideal shooting distance to your subject from a flash unit's guide number, aperture and ISO.
Open calculator →Flash Aperture Calculator
HobbyCalculate the correct f-stop for flash photography from guide number, distance, and ISO. Instantly see the nearest standard f-stop and the correct distance for each aperture.
Open calculator →Lens Focal Length Calculator
HobbyEstimate the lens focal length (mm) and 35mm equivalent you need from your subject distance, real size, and sensor width.
Open calculator →Camera Angle of View Calculator
HobbyEnter a lens focal length and image sensor size to instantly calculate how wide a scene the camera captures: the horizontal, vertical, and diagonal angle of view. Includes presets for full frame, APS-C, Micro Four Thirds and more (plus custom sensor sizes) and shows the 35mm equivalent focal length too.
Open calculator →