Auto-translated
In the third installment of the Heroes series, a single unit (or stack, as it's also called) can consist of multiple monsters. Each monster has attack and defense stats, as well as a damage value. However, battles between monsters without heroes are not possible in the third game, at least I haven't encountered it. Therefore, the attack and defense stats of the heroes are added to the attack and defense stats of the monsters.
In general, the formula is as follows:
monster damage * number of monsters * (1 + K * (attacking monster's attack + attacking hero's attack - defending monster's defense - defending hero's defense))
where K = 5% if the number in the parentheses is greater than zero, and 2.5% if the number in the parentheses is less than zero.
In simpler terms, the higher the attack, the more damage we will inflict.
There are also other modifiers that affect the damage dealt, such as the hero's secondary skills "attack" and "defense," and some monsters have interesting variations.
To start, I recommend that you set the characteristics on the battlefield, and then, when you hover the mouse over the attacking unit, you will see how much damage your stack can inflict on it, or rather, you will see the range of this damage.