Energy after inverting voltage?
24v times 40Ah makes 960 WattHours (Wh), not 960 Watts.

If you ran this through a perfect inverter, you would get 960Wh out. 

To do the sums in my head, I'm going to call it 240v, so 960Wh would come out at 4Ah (slightly more Ah at 230v).

That's for a perfect inverter. In practice, you'll see a useful output of (probably) 80% to 90% of that, with the rest lost as heat in the inverter.