We presume you're talking about domestic J/Bs for connecting twin /earth ?
Don't think anyone "calculates " for a J/box ....as Dave says , suit it to the load of the circuit .
We have a 30 A circuit , what size J/B do I need ?
1) 6A ?
2) 10A?
3) 15A?
4) 20A?
5) 30)?
6) 60A ?