Beginner

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.
Typically 5–20 classes; Sturges' rule: k ≈ 1 + 3.322 × log₁₀(n)
Class Width
10

(Maximum − Minimum) ÷ Number of classes

Range (max − min)
70
Number of classes (k)
7
Exact class width
10
Rounded-up class width
10
Lower boundary (1st class)
10
Upper boundary (last class)
80
1018.827.536.34553.862.571.380MinMaxNumber line: tick marks at class boundaries; highlighted segment = first class interval
Step by step
  1. 1

    Range (maximum − minimum)

    80 − 10 = 70
  2. 2

    Class width = Range ÷ k

    70 ÷ 7 = 10
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

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
Class Width = (Maximum − Minimum) ÷ Number of Classes (k)
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

class width calculator
class interval size calculator
frequency distribution bin width
histogram class width
grouped frequency table class size
range divided by number of classes
sturges rule class width

APA

TG we-Calculate Editorial Team. (2026). Class Width Calculator — Frequency Distribution [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/class-width-calculator

Chicago

TG we-Calculate Editorial Team. "Class Width Calculator — Frequency Distribution." TG we-Calculate. 2026. https://we-calculate.com/calculator/class-width-calculator.

IEEE

TG we-Calculate Editorial Team, "Class Width Calculator — Frequency Distribution," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/class-width-calculator

BibTeX

@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?