If you are working with statistics, you might use histograms to provide a visual summary of a collection of numbers. A histogram is a little like a bar graph that uses a series of side-by-side vertical columns to show the distribution of data. To make a histogram, you first sort your data into "bins" and then count the number of data points in each bin. The height of each column in the histogram is then proportional to the number of data points its bin contains. Picking the correct number of bins will give you an optimal histogram.
Calculate the value of the cube root of the number of data points that will make up your histogram. For example, if you are making a histogram of the height of 200 people, you would take the cube root of 200, which is 5.848. Most scientific calculators will have a cube root function that you can use to perform this calculation.
Take the inverse of the value you just calculated. To do this, you can divide the value into 1 or use the "1/x" key on a scientific calculator. The inverse of 5.848 is 1/5.848 = 0.171.
Multiply your new value by the standard deviation of your data set. The standard deviation is a measure of the amount of variation in a series of numbers. You can use a calculator with statistical functions to calculate this number for your data or calculate it manually. To do the latter, determine the mean of your data points; figure out how far each data point is from the mean; square each of these differences and then average them; then take the square root of this number. For example, if the standard deviation of your height data was 2.8 inches, you would calculate 2.8 x 0.171 = 0.479.
Multiply the number you just derived by 3.49. The value 3.49 is a constant derived from statistical theory, and the result of this calculation is the bin width you should use to construct a histogram of your data. In the case of the height example, you would calculate 3.49 x 0.479 = 1.7 inches. This means that if your lowest height was 5 feet, your first bin would span 5 feet to 5 feet 1.7 inches. The height of the column for this bin would depend on how many of your 200 measured heights were within this range. The next bin would be from 5 feet 1.7 inches to 5 feet 3.4 inches, and so on.
TL;DR (Too Long; Didn't Read)
Some people prefer to take a much more informal approach and simply choose arbitrary bin widths that produce a suitably defined histogram.