I believe that it determines the average range of the soldiers and then rounds to the nearest whole number. So, for example, if you have a unit of 60 men with 4 range and then recruit an additional 40 men with 3 range, the average range of your men would be 3.6, which would effectively round up to 4 range on the unit info page and when in battle.