Formula: Volts of the battery x Ah rating of the battery / Watts of the load / The battery’s depth of discharge (DoD) x The efficiency of the inverter
If you have a 100 watts 42" TV and a 12V 7ah battery lying around and a UPS for example, then you can work out the runtime using the calculator below.
The battery’s depth of discharge (DoD: 1.25 = 80% used, 2 = 50% used, 3 = 33.3% used, 5 = 20% used )
The efficiency of the inverter (60% if you are using a UPS, 85% if you are using a good inverter)
For those new the industry, DOD sounds like it may be a difficult topic to understand, but it's actually simple. For instance, a battery that has been drained 30% has a 30% DOD, and 70% of its capacity remains.
The more frequently a battery is charged and discharged, the shorter its lifespan will be. Discharging a battery entirely, dramatically shortens the useful life of the battery.
Most modern lithium-ion batteries have DoDs ranging anywhere from 80% to 95% versus their lead acid counterparts can only do 30% to 50%.
Lithium also have thousands of cycles and lead acid has 200 to 400 cycles at best.