AFAIK there is a certain degree of freedom in how you choose your intervals.
What you should make sure is that
1) all intervals have the same width
2) the union of all your intervals contains all your data points
3) if the measurement you're dealing with can only output integer numbers, then your intervals should also have the same granularity, i.e. each interval should have an integer lower and upper limit.
That said, the usual way is to choose numbers so that there are no uselessly empty classes and possibly they are bounded by "nice" numbers (5, 10 etc)
For example you chose a "minimal coverage" solution, choosing data range/nr of intervals for their size. Won't work as well for 10 classes, as each interval should measure 7.6 and you'd end with interval limits that are not integers.
I'd rather round it up to 8, meaning that you can start lower than the minimum data point and end higher than the maximum (8-15, 16-23 ... 80-87).
Also please note that in your 5 classes case you're off by one: the very first interval spans 16 numbers instead of 15, thus your frequencies are not homogeneously sampled which is a big no-no. The fact is that while 85-10=75, there are 76 integer numbers between 10 an 85 when you include both extremes. In the same way 10-25 covers 16 integer numbers, but 26-40 and all subsequent intervals only 15.
Thus, even in the "5" case, I'd say you should round the interval width up to 16.







