Inverter runtime equals usable battery watt-hours divided by the AC load in watts. Take a 100Ah 12V battery: rated energy is 100 × 12 = 1,200 Wh. Use 80% of it through a 90%-efficient inverter and 864 Wh remain usable. Powering a 500 W load, that battery runs 864 ÷ 500 = about 1.7 hours. The calculator above does this instantly and also shows usable watt-hours, minutes, and the DC amps drawn from the battery.
Two adjustments separate this from the naive "amp-hours × volts ÷ watts" estimate: depth of discharge (you should not drain a battery flat) and inverter efficiency (5–15% of energy becomes heat in conversion). Both shorten real runtime, and both are built into the result so your estimate matches the meter.