How is the bin-width calculated?

Hello, I have some unclear documents about the scale in automatic grouping. Can you tell me in detail how bin width is calculated? Do you have any melon documentation?