If you want to know the math behind damage calculation: heroes.thelazy.net/wiki/Damage
Simple version:
if atk > def, damage = stack_size * rand(min_dmg, max_dmg) * (1 + 0.05 * (atk - def))
if def < atk, damage = stack_size * rand(min_dmg, max_dmg) / (1 + 0.05 * (def - atk))
stack_size is the number of creatures in the attacking creature's stack
rand(x, y) is a random integer >= x and <=y
I am mostly interested in troop sizes required to take down another troop. For example, can I calculate how many Gargoyles I need to take down 76 Elite Griffins?
Total griffin hp = 25 * 76 = 1900
atk (gargoyle) = 6
def (griffin) = 9
def > atk, so we use the second formula (to have 100% chance to kill all griffins in one hit, we're using the minimum damage for gargoyle, which is 2)
stack_size * 2 / (1 + 0.05 * (9 - 6)) = stack_size * 2 / 1.15 ~= stack_size * 1.74
So we need stack_size * 1.74 = 1900, which means stack_size = 1900/1.74 ~= 1092.
So you need 1092 gargoyles to one-shot all griffins 100% of the time. I told you you need a thousand gargoyles