Hi Vojtěch Vrána,
Good day to you and hope you are doing well.
According to your description, it seems like you want to get the formula which determines the bin width in histogram chart.
According to this article Create a histogram (microsoft.com)
Hope it can help you.
Best regards,
Tina