Auto-translated
Sorry, I was wrong. The strength of the army is indeed calculated not by hits, but by value. The formula is correct; the coefficient k=A/N should be calculated not as the ratio of the total number of hits in the army to the total number of hits of the neutrals, but as the ratio of the total value of the army to the total value of the neutrals. That is, A=value1*n1+value2*n2+...+value7*n7, where value1, value2, ..., value7 are the value of each stack of monsters according to the table, and n1, n2, ..., n7 are the number of monsters in that stack. N is the total value of the attacking neutral. If there is no upgraded stack, it is easy to calculate: multiply the value from the table by the number. But if there is an upgraded stack, then depending on the strength of your army, the number of monsters in the upgraded stack changes, and accordingly, their total value changes (I haven't personally checked this, but I just logically assumed it).
Example:
We are attacking the same 9 angels with an army consisting of 30 fanatics and 11 champions. The value of the angels is 5019*9=45171 units. The value of our army is 30*750+11*2100=45600. Therefore, k=45600/45171=1.0095. k is greater than 1, but less than 1.5, which means that according to the Physmig table, there will be 3 stacks. If we remove one fanatic, it will be 29*750+11*2100=44850; k=44850/45171=0.9929. k is in the range of 0.67 to 1, and according to Physmig, there should already be 4 stacks.
I don't know about offline, but this is very useful sometimes for online play, but it is unrealistic to calculate all this, unless you hire a navigator with a calculator :D