Class Width Calculator — Frequency Distribution
Enter the minimum value, maximum value, and desired number of classes to compute the class width (class interval size) for a frequency distribution table or histogram.
(Maximum − Minimum) ÷ Number of classes
- 1
Range (maximum − minimum)
80 − 10 = 70 - 2
Class width = Range ÷ k
70 ÷ 7 = 10
How does this calculator work?
Class width = (max − min) ÷ k. For data from 10 to 80 in 7 classes: width = 70 ÷ 7 = 10. Round up to the nearest convenient whole number. Use Sturges' rule k = 1 + 3.322 × log₁₀(n) to choose how many classes, or keep between 5 and 20 for a readable histogram.
Formula
How this is calculated
A frequency distribution table organises raw data into equal-width intervals called classes. The class width is the length of each interval: divide the data range — maximum minus minimum — by the chosen number of classes k. For example, data running from 10 to 80 split into 7 classes gives class width = (80 − 10) ÷ 7 = 10.
In practice the exact result is often rounded up to the nearest whole number or convenient multiple (5, 10, 25 …) so that class boundaries fall on clean values. Rounding up is intentional: the last class boundary may extend slightly above the data maximum, ensuring every observation falls in exactly one class with no leftover fraction.
Choosing k is a judgment call. Sturges' rule k = 1 + 3.322 × log₁₀ n gives a sensible starting point for a data set of n observations. Practical guidance: 5 to 20 classes usually produces a readable histogram. Too few classes obscures the shape of the distribution; too many spreads the data thin and produces an irregular-looking chart.
Frequently asked questions
Most textbooks recommend rounding up to the nearest whole number or a convenient multiple so boundaries are clean integers or simple decimals. Both values are shown. Using the rounded-up width means the last boundary exceeds the data maximum slightly, which is expected and ensures full coverage.
A common rule of thumb is 5–20 classes. Sturges' formula k = 1 + 3.322 × log₁₀(n) gives an estimate for n data points. Fewer than 5 classes hides distribution shape; more than 20 typically creates too many sparse intervals that obscure the pattern.
Class width is the length of each interval (e.g. 10). Class boundaries are the actual start and end values — the first class begins at the data minimum, and each subsequent boundary is minimum + (class index × width). All classes share the same width.
Also known as
TG we-Calculate Editorial Team. (2026). Class Width Calculator — Frequency Distribution [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/class-width-calculator
TG we-Calculate Editorial Team. "Class Width Calculator — Frequency Distribution." TG we-Calculate. 2026. https://we-calculate.com/calculator/class-width-calculator.
TG we-Calculate Editorial Team, "Class Width Calculator — Frequency Distribution," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/class-width-calculator
@misc{wecalculate_class_width_calculator, title = {Class Width Calculator — Frequency Distribution}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/class-width-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
