Edfactor is bang-on with the mathematics here.
What you end up with is essentially a ‘probability tree’ with a double-branching for each unit being rolled, since each unit can only either hit or miss; hence two options or what is known as binomial probability.
These are relatively simple to figure out if all the units are attacking at the same probability (have the same attack value). Since we are looking at mixed units, n of them, you could end up with some very large numbers of brances to have to add-up.
For example, if you have 10 units attacking, then you could have 210=1024 probability branches to add up…this volume of calculation is best done by some electronic processor; allowing your brain to worry about interpreting the odds and adjusting your strategy as required.
I’m sure many out there can suggest countless different options in terms of apps (PC or other format).