It is 1/6th of the total attack (resp. defense) strength of all the units in the army combined before military academy and 1/4th of total attributes after it is built.
So, pre-military academy, an army of 4 cavalry (possible with lots of leaders and Pentagon) will have an attack bonus of (6+6+6+6)/6 = 4 and a defense bonus of (3+3+3+3)/6 = 2, so it's effectively a 10/5/4 unit. NOW, after the academy finishes, those denominators go to 4, so the attack bonus is 6 (24/4) and defense bonus is 3, so it's a 12/6/4.
Army of 3 swordsman (no MA) has attack bonus of (3+3+3)/6 = 1.5 rounded down to 1 (I *think* -- not sure of the rounding) and defense bonus of (2+2+2)/6 = 1, so it's effectively a 4/3/2 unit.
Army of 3 immortals (no MA). Attack bonus of (4+4+4)/6 = 2 and defense bonus of (2+2+2)/6 = 1, so a 6/3/2 unit.
Armies of 4 of anything after the MA effectively double their attack/defense numbers, because they're added four times for total strength divided by 4, which always equals the original strength.
Arathorn