Generally, it entirely depends on your device. For more power-consuming devices, UPS can supply power for less time. In contrast, less power-consuming devices can supply power for a longer time. So, when choosing an inverter, always choose an inverter whose output power is 20-25% higher  than the total wattage of the devices you want to connect.