Here are the basic formulas used in battle
Life
((((Medicine lvl *5)+100)/100)*base life)+Hero intellegence
Attack
Base attack * (hero attack + (Military Tradition*5)+100)/100 * Number of units * (1.2 if warhorn is activated) * (attack modifier)
Attack modifier depends on which units fight what
if you attack workers the modifier is .96 for all units
if you attack warriors it is 1
if you attack scouts it is .97
if you attack pikes it is 1 unless you have swordsmen then it is 1.1
if you attack swordsmen it is 1
if you attack archers it is 1 except for calvary and cataphracts it is 1.2
if you attach calvary or cataphracts it is 1 except for pikemen it is 1.8
if you attack any mechanics it is always 1
Defense
1-((((Ironworking * 5) + 100)/100) * base defense)/1000
Battle Life
Life/defense
Kills
Attack/Battle Life
here is example
if you have 100 warriors verses 100 warriors your hero attack is 80 enemy intellegience is 45 and you both have all lvl 10 technologies no war horn
Life = (50+100)/100)*200)+45 = 345
Attack = 50 * (80 + 50 + 100)/100 * 100 * 1 = 11500
Defense = 1-(((50+100)/100) * 50)/1000 = .998
Battle Life = 345/ .998 = 345.69
kills = 11500/345.69 = 33.26
so in one round you will kill 33 enemy warriors