A:
It depends how many devices are plugged into the ports, that stay on, if the power goes off.
Most people should plug in ONLY PC, MONITOR and MODEM! Do not plug in any printers or other "hungry" devices!
If you computer is i7 and you have a Tower style PC with lots of hard drives, fast video card ... it will use much more power - so your PC will stay on much shorter than a regular inexpensive PC that doesn't have a fancy video card and one hard drive.
My APC UPS was on for about 25 minutes before the USB cable gave my PC the SHUT-DOWN-COMMAND! But we do not have power shortages or loose power more than 1x in 10 years and it is almost never any longer than few minutes!
If your house looses power for long periods of time, you should consider to purchase a small generator, that comes on automatically when your loose power . It is much less expensive than purchasing a very large UPS (Uninterruptible Power Supply). The more Watt Hours the UPS is, the more $$$ one must pay and the batteries last only few years, before one must replace them.
I use UPS mainly to protect my equipment, including my TV's, computers, 3D printers, printers .... from spikes and or low power voltages, because our city has excellent power providers.