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.
Recommended by Our Editors
(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)
About Our Expert

Jason Cohen
Senior Editor, Help & How To
Experience
As PCMag's editor of how to content, I have to cover a wide variety of topics and also make our stories accessible to everyday users. Considering my history as a technical writer, copywriter, and all-around freelancer covering baseball, comics, and more at various outlets, I am used to making myself into an expert.
I believe tech corporations are bad, but you might as well know how to use technology in everyday life. Want more how to content delivered right to your inbox? Sign up for the tips and tricks newsletter that I curate twice a week.
My job as how-to guru means I use just about every gadget under the sun, so I can figure out how everything works. I work from a Lenovo ThinkPad running Windows 11, but also have a very large Dell Inspiron 17 3000 and Apple silicon MacBook. I also have a Google Pixel 6a for personal use and use a Galaxy Z Flip 4 for additional Samsung-related testing. For iOS coverage, an iPhone 13 mini works like a charm, though it's already becoming a little long in the tooth.
My desktop situation includes a dual monitor setup with a modest Acer monitor. I also use a Logitech mouse (who can use these ThinkPad trackpads) and a Havit keyboard (my first mechanical keyboard; I love it but my wife hates it!). I'm a recent convert from wired headphones; I have Anker Soundcore Liberty Air wireless earbuds for personal use and have taken to the Sennheiser HD 450BT headphones for work.
Whenever I have a second to myself, I'm probably gaming on my Nintendo Switch, Steam Deck, or Xbox Series S. I also still have a bunch of classic consoles lying around as well.
Read Full Bio