Sturges' Rule Calculator

Calculate Optimal Number of Bins

Formula

The formula to calculate the optimal number of bins using Sturges' Rule is:

\[ OB = \log_2(N) + 1 \]

Where:

What is Sturges' Rule?

Sturges' Rule is a simple formula that describes the optimal number of bins to use when making a histogram given a certain number of observations in a data set. An observation is a unique data point. For example, if a data set contains many numbers but the number 10 occurs twice, it counts as one observation.

Example Calculation

Consider an example where:

Using the formula to calculate the optimal number of bins:

\[ OB = \log_2(100) + 1 = 7.64 \approx 8 \]

This means that the optimal number of bins for this example is 8.