For best results, you need to tell us: what are you going to be with your Raspberry Pi. Are you going to use it as a desktop? A server? If so, do you need backup power for your modem? Are you going to use it as an automatic control system? Outdoor? Do you need protection against momentary power-loss only? Or you need to have a longterm battery backup? How much runtime do you need?<p>But in general, there are three practical solutions. You need to choose one from your intended applications.<p>1. Use an office/server UPS, 110/220 VAC. This is not recommended, many UPS are optimized for 50%-80% load, the conversion loss of the inverter is significant. If you put a very light load on an office UPS, like a lamp, a modem of a Raspberry Pi, some UPS's inverter will drain itself first before the load even drains battery. However, if you intended to use the Raspberry Pi as a desktop or server in your home or office, or you only need to protect brief loss of power, you SHOULD USE this option, since your LCD monitors, external drives, etc, probably also needs a UPS. You can also try finding one designed to supply backup power to routers and modems to avoid the light-load problem. Other advantages include strong safety guarantee, and a good UPS has a data port. But it seems that UPS units designed for modems, and UPS units that have a data port is mutually-exclusive...<p>2. Use a 5-volt power board. There are plenty of low-cost little boards available on AliExpress (<a href="https://www.aliexpress.com/af/Raspberry-Pi-UPS.html" rel="nofollow">https://www.aliexpress.com/af/Raspberry-Pi-UPS.html</a>). They are basically a 18650 Lithium-ion battery charging board with a boost converter and a USB output. The size and efficiency made them an ideal choice if you only need to power a single Raspberry Pi with some accessories (e.g. sensors, screens). But there is no way to tell how much power is left in the battery without hardware modification.<p>3. Use a 12-volt backup power, with a 5-volt DC-DC converter board. Sometimes, powering a Raspberry Pi is not enough, the modem and router also needs backup power. In this case, using a 12-volt backup power intended for routers and IP cameras is preferable, e.g. <a href="https://www.amazon.com/Monerator-Uninterruptable-Independent-Standby-Wrieless/dp/B07RPMXQ7M/" rel="nofollow">https://www.amazon.com/Monerator-Uninterruptable-Independent...</a>. The 5-volt power can be obtained by using a 12-volt to 5-volt buck converter board, e.g. <a href="https://www.amazon.com/Converter-DROK-Regulator-Inverter-Transformer/dp/B01NALDSJ0" rel="nofollow">https://www.amazon.com/Converter-DROK-Regulator-Inverter-Tra...</a>. Also, there is no way to tell how much power is left in the battery without hardware modification.<p>4. Use an open-source UPS specifically designed for Raspberry Pi, some have battery data output, but I don't personally know any. There's an overlap between (2) and (4).<p>WARNING: If you decide to choose (2), (3), or (4), remember: boards with poorly-designed circuits, defective Lithium-ion batteries, or exposure to outdoor environment can be very dangerous. Linked products are examples, I do not endorse any of the products. Caveat Emptor.