A useful calculation for the "Major diameter" or bolt size or like you have 1/8" diameter rod stock.
The first thread number is the diameter.
To determine the OD size,
Multiply the first number times 13 and add 60.
So for your 5-40 threads,
5 x 13 = 65 add 60 = 125 or 0.125 diameter.
For 6-32...