Following formula are used to calculate spanner size –
For bolt size upto M14
Spanner Size = ( Bolt Size * 1.5 ) + 1
Example for M12 bolt , Spanner Size = ( Bolt Size * 1.5 ) + 1 = ( 12 * 1.5 ) + 1 = 18 + 1 = 19
Above from M16 bolt
Spanner size = Bolt Size * 1.5
Example for M16 bolt , Spanner Size = Bolt size * 1.5 = 16 * 1.5 = 24