The math works, but different bonuses apply in different parts of the formulas. For example, if you can do damage say 400, getting a new "25%" improvement to a weapon somewhere doesn't mean you now can do 500. It depends on the category of the improvement and on your existing improvements that are like it. Eg, Adding 25% from a weapon, improves your tier 1 warriors by 25 points (100*25%). So if your total attack was 1000 before (with that tier 1 due to many other bonuses), it now becomes 1025. So you didn't improve 25% from where you were right before. You improved 25% from the base attack of 100 (yet actually improved only 2.5% from your prior 1000).
Some bonuses are compounded based on where you are (or enemy is) and perhaps without combining with others (I think enemy reductions work this way), others apply to a base amount (like weapons, knowledge, eg, which are a percent on the tier base score), and the type of bonus (time, strength, etc) also matters.
More examples:
1. A 50% attack 10 minute time boost would lead to 1500 if you had 1000.
2. The beast skin 10% (for 5 days) in training, knowledge, building combines with other boosts like the typical 10% boosts everyone gets on some days for taining, knowlege, etc. That also combines with the 35% related boost that you can apply for 10 minutes. All of these reduce from 100% the time required for training, etc. So 10+10+35 = 55 so your training becomes 45% of what it would be. In contrast to this, a bunch of 10% gem boosts add together separately and then are added to 100% and the result divides to give your overall. Eg, if you need 1000 seconds and have 150% time improvements from weapons and knowleges, your overall time will be 1000/2.5= 400 seconds. To that you can multiply another 45% from above to get 400*.45 = 180 seconds. So if you grab en extra gem to improve to 160%, your overall becomes 1000/2.6*.45=173 seconds. On ther other hand, if you managed to find a 10% improvement that combines with the first category of boosts mentioned, your new time is 1000/2.5*.35=140 seconds. [note, the 2.6 is just 260% = 100% + 150% + 10% in above example]
So experiment to see how improvements combine and then you can focus on getting biggest bang for buck. If you have enough time/money etc, you probably want to maximize everywhere to get the edge, which in some cases can make a decent difference depending on the fight details (especially due to many needed rounds in some fights).
OK, one more tip -- some fighting details:
A fight (eg, on enemy town) appears to be composed of rounds until one side is dead. Also, during a round, all the power of your troops will get applied to reduce the enemy even if at the end of that round (when enemy's power applies to you) you have lost the troops. So every troop contributes its damage at least 1 round; a troops damage contributes in the round in which they die and all earlier rounds. That can be very useful information.
..You want to maximize the product of 4 values for maximal strength generally (in specific cases it can be best to focus on just attack or just defense and health or maybe focus on number of troops depending on the limitations of the particular battle and which side is how strong). The 4 values are Attack, Defense, Health, and Number of troops. Troopnum multiples with Attack for your total attack damage during a round (more or less.. i think there is a constant factor applied and some other things like your enemy's enemy reductions). Defense multiplies with Health (divided by 100) for your total energy from which to subtract enemy's damage on you. This is one way to look at it.
..The way I think about it though is that your Numtroopsyouhave* (Attacktotalofyou/Defeseofenemy)*100 is your attack that then gets subtracted from enemy health, removing 1 enemy as its health is passed. That many enemies will die at the end of the round after the enemy also applies their damage to you for that round (and I remember a .65 factor in there to make the actual numbers match the calculated result .. iirc.. haven't looked at my notes in a while). There is more complexity when you look at tiers and troop types and onslaught and other details. [Tier may not matter at all or it may matter only to see who dies first; however, i think death might instead just be starting with weakest health on up.. maybe lower tier if there is a tie. notsure.]
..And very important to leverage enemy reductions to affect these numbers.
..Eg, You have 10 troops at 101A 102D 103H, and enemy has 104 troops at 105A 106D 107H. This means that (assuming there is a .65 factor in there and no other affecting bonuses at all) your damage for the first round will be 10*101/106*100*.65 = 619. This will kill 619/107 = 5.7 or 5 enemy troops the first round. Meanwhile, you will lose 104*105/102*100*.65 / 103 = 67.5 or 67 troops, aka, all 10 of your troops after round 1 and war is over. They will have left 104 - .8*5 = 100 troops and you get 10 - .8*10 = 2 troops since you each get back 20% of the troops that would have died.
..A byproduct of this algorithm is that a weak troop against a weak troop last about 1 or 2 rounds to determine the winner, but a strong troop against a strong troop can last many rounds before 1 dies. Basically, a troop that goes up in Attack, Defense, and Health proportionally becomes harder to kill faster than their ability to kill grows. In other words, while a high tier troop with lots of bonuses is definitely stronger in attack than a weak troop. It is (more notably) significantly harder to kill than that weak troop. Eg, 25 or so 100,100,100 troops match 1 500,500,500 troop in head to head. [This can be leveraged by either side to pick how they use high tier troops and when to attack or allow to be attacked.]
..Another implication is that top tier troops are intended to do well in multi round combat to get their maximum value.
..Another implic is that having a somewhat higher strength (taking all 4 stats from both sides into account) can lead to a lot fewer troop losses as the number of rounds needed goes up and the advantage you start with increases with each new round (compounding in effect). This is how a small improvement in stats can lead to much better outcome in some cases.