(Credit: René Ramos, Lily Yeh; Microsoft; Igor Kyrlytsya / Shutterstock)
Nothing lasts forever, including the batteries that power our favorite electronics. The good news is that Windows laptops have a (roundabout) way of tracking whether your battery is still functioning or nearing the end of its life. A simple line of code can generate a battery report that displays usage data, capacity history, and life estimates. If the battery needs to be replaced, this report will alert you before it fails.
Generate a Battery Report
The battery report is accessible via Windows PowerShell, a built-in command-line tool you may have never used before. The easiest way to access it is to right-click on the Start icon and select Terminal (Admin) (Windows 11) or Windows PowerShell (Admin) (Windows 10). Click Yes when the pop-up window asks for permission to make changes to your device.
(Credit: PCMag / Microsoft)This will open Windows Terminal, a tabbed terminal emulator that can run PowerShell, Command Prompt, and other command-line programs. PowerShell will be open by default, so enter the code powercfg /batteryreport /output "C:\battery-report.html" and press Enter.
(Credit: PCMag / Microsoft)The first part of the code generates an HTML file containing the battery life report. The second part, in quotes, dictates where the file will be saved on your computer and what it will be called. In this instance, a file named battery-report.html will be saved to the C: drive. You can now safely close Windows Terminal.
(Credit: PCMag / Microsoft)Open File Explorer and click the OS (C:) entry under This PC. The battery report will be saved in this folder as an HTML file. Double-click to open the file in your default web browser.
(Credit: PCMag / Microsoft)What's in Your Laptop Battery Report
The report will outline the health of your laptop battery, how well it has been doing, and how much longer it might last. At the top, you'll see basic information about your computer, followed by the battery's specs. Under Recent Usage, note each time the laptop ran on battery power or was attached to AC power. The Battery Usage section tracks every drain over the last three days. The Usage History section also provides a full history of the battery's usage.
(Credit: PCMag / Microsoft)The Battery Capacity History section shows how the capacity has changed over time. On the right is Design Capacity, or how much the battery was designed to handle. On the left is Full Charge Capacity, which shows the battery's capacity on a full charge and will likely decline over time as you use the device.
(Credit: PCMag / Microsoft)This leads us to the Battery Life Estimates section. On the right, you can see how long it should last based on design capacity; on the left, you see how long it's actually lasting. A current, final battery-life estimation is at the bottom of the report. In this case, my PC would last 6:02:03 at design capacity, but will currently only hold out for 4:52:44.
(Credit: PCMag / Microsoft)If you don't like what your battery report says, these easy tips can help you squeeze longer battery life out of your current laptop. If you're ready to buy a new computer altogether, these laptops have been rated to have the highest battery capacity.
(Credit: PCMag / Microsoft)


