Sturges' Rule Calculator

The Sturges' rule calculator determines the number of bins to use in a histogram from the given sample size.

How to Use the Sturges' Rule Calculator?

  1. First, input the sample size of a dataset.
  2. Now press the 'Calculate' button.
  3. Finally, the tool returns the number of bins to use based on the given dataset.

Sturges' Rule Formula

The following formula is used to find the optimal number of bins to use in a histogram:

Number of Bins = ⌈ 1 + log2(n) ⌉

Where,
n = Number of observations in a dataset,
⌈ ⌉ = Symbols define 'Ceiling' (Round the result up to the nearest integer).