I second that last advice, it's the easiest way to get close to solving.
Basically there is also Watt's law, like Ohm's but relates to power, and it's when both work together that it gets slightly odd. W=V2/R, where R is the speaker impedance, V is voltage, and W is the power, watts. Without getting to details like frequency-depenance of impedance, it's important to see that SMALL changes of voltage can make big changes in power, it goes up as a 'square law'. The numbers don't matter, but that square law thing DOES because it trumps all other scales of intensity in the calculation.
In practise what that means is it's only the strong transients in the output that will drive anywhere near the full power, if you're careful to avoid blasting all controls to 11 and trying to break your guitar. The usual signs of hard transients is a farty sound on the attack of the note. So long as you back off when that happens (assuming you're not making a preamp do it deliberately), it will be safe unless something else is wrong somewhere.
Just turning up volume goes with a non-linear curve so anything but full throttle on a 400W amp into a 400W cab will actually drive a lot less than 400W. In other words, get the impedance matched, that's important, but matching power is far less so if you're careful to listen for signs of stress.