Unit Atk = base atk * formation coefficient + general bonus + aura bonus + unit level bonus + morale bonus + country bonus
Formation coefficient: divide your unit's current hp by its max hp of a single formation and you can find which range does it fall into.
(0-0.5): 0.5
[0.5-1.5): 1
[1.5-2.5): 1.25
[2.5-3.5): 1.4
[3.5-4]: 1.5
General bonus: check the attack bonus in the respective area.
Aura bonus: check the skill explanations.
Unit level bonus: the unit's attack will increase at levels 1,3, and 5. Check the technology page for the actual number. Technology determines the initial level of the units.
Morale bonus: rising +5, dropping once -5, dropping twice -10, affects both minimum and maximum.
Country bonus: exists if the color of the unit's attack is green.
Damage = unit atk * defense coefficient * crit coefficient * damage bonus by percentage * damage reduction by percentage + damage bonus by fixed amount
Defense coefficient: (def + 48) / (4 * def + 48)
Def value is next to the shield icon in the unit stats page.
Crit coefficient: 1.5