By default, the battery icon in your Mac laptop’s menu bar shows how full your battery is. Clicking it reveals the exact percentage, but you can also set macOS to display the battery percentage next to the icon. The setting isn’t where you might expect in System Settings > Battery. Instead, you’ll find it in System Settings > Control Center, where you need to turn on both “Show in Menu Bar” and “Show Percentage.”
You can also display the percentage of your UPS (battery backup) if it is connected via a USB cable to your Mac Desktop computer.