# Freedman–Diaconis rule

$\text{Bin size}=2\, \text{IQR}(x) n^{-1/3} \;$
where $\scriptstyle\operatorname{IQR}(x) \;$ is the interquartile range of the data and $\scriptstyle n \;$ is the number of observations in the sample $\scriptstyle x. \;$
Another approach is to use Sturges' rule: use a bin so large that there are about $\scriptstyle 1+\log_2n$ non-empty bins (Scott, 2009). This works well for n under 200, but was found to be inaccurate for large n. For a discussion and an alternative approach, see Birgé and Rozenholc.