UPS backup time depends on the power consumption of the load and the capacity of the battery. As we know, the unit of power is W (Watt), and unit of the capacity of battery is Wh (Watt-hour). These units indicate the basic relationship of the load power consumption and battery capacity, plus efficiency and battery discharge curve, we can estimate the backup time.
Power consumption of load: please sum up all consumption of the load if you have several devices. Most appliances do not consume specified power stably. Instead, they usually consume different power from time to time, it’s better to check the document of the devices to understand the power in different operation modes. Then, estimate a total power of the load. This value is the first step for calculation.
Secondly, check the efficiency of the UPS according to the power of the load you just got. Use these two values, we can get the real power we need from the battery:
Battery output power = Efficiency X Load power
As mentioned, battery capacity is described in Wh. For lithium-ion battery, we can use this value and consider the DoD (Depth of Discharge) to calculate backup time:
Backup time = (Battery capacity X DoD)/(Battery output power)
For examples, the total load power is 1000W, the UPS efficiency at 1000W is 90%, the battery is 200Wh, DoD is 90%. Then the backup time is above 9 minutes:
200Wh*0.9/(1000W/0.9)*60(min/h) = 9.72 min
Usually we don’t consider the calculated value is accurate backup time because of the following parameters:

1. The load power is not exactly shown on the document and changes from time to time depending on operation modes
2. Operation environment, especially temperature impacts the battery capacity
3. As we know, the UPS is purchased to secure the power supply when main is gone. In practice, people purchase the UPS with backup time more than the target. Considering this, it’s not necessary to get a very accurate calculated backup time

The most popular UPS battery is lead acid. Unfortunately, because of its characteristics, the calculation of the backup time of lead acid battery is not direct as lithium-ion battery. Lead acid battery performs different capacity at different output power, which is not constant, even not able to describe in a formula. The practical way is to use the discharge table provided by the battery manufacturer, pick up the expected output power and look up the table to get the backup time.

Here is an example of a lead acid battery discharge table. Through it, you can find out the difference of the capacities at different output power.

1. 91Ah @688W: 688(W)*2(min)/60(min/hr)/12(V) = 1.91Ah
2. 25Ah @50W:   50(W)*90(min)/60(min/hr)/12(V) = 6.25Ah