DEV Community

Cover image for powercfg /batteryreport: Check Laptop Battery Health on Windows
epifive
epifive

Posted on Originally published at epifive.com

powercfg /batteryreport: Check Laptop Battery Health on Windows

The powercfg /batteryreport command creates a battery health report as an HTML file (battery-report.html) in the current folder. Open Windows Terminal or Command Prompt, run it, then open the file in a browser and compare Design capacity (what a new battery holds) with Full charge capacity (what yours holds now) under Installed batteries; dividing full charge by design gives your battery health as a percentage.

Who this is for

This is for anyone whose Windows laptop seems to run out of charge faster than it used to and who wants a measurement before paying for a replacement battery or a new laptop. You will end with a battery report, a calculated health percentage, an understanding of what the other report sections show, and a decision framework. It applies to Windows 10 and Windows 11 laptops and tablets that have a battery.

What powercfg is

powercfg.exe is a command-line tool built into Windows. Microsoft documents it as a way to control power plans, the sleep states and device power states, and to analyse the system for energy-efficiency and battery-life problems. One of its options, /batteryreport, generates a report of battery usage characteristics over the lifetime of the system.

Prerequisites

  • A laptop or tablet with a battery that reports to Windows. Desktops have no battery. Microsoft's BatteryReport documentation says values return null when the battery is not present or when the value is not reported by the battery controller.
  • Windows Terminal, Command Prompt or PowerShell.
  • A web browser to open the HTML file.
  • Ideally, the laptop charged to 100 percent before you read the numbers, with no heavy tasks running. A reading taken right after a long discharge can mislead, which is explained in the troubleshooting section.

The powercfg /batteryreport command

Microsoft's Powercfg reference describes the option as one that "generates a report of battery usage characteristics over the lifetime of the system" and gives this syntax:

powercfg /batteryreport [ /output file_name ] [ /xml ]
powercfg /batteryreport [ /duration days ]
Enter fullscreen mode Exit fullscreen mode
Argument What Microsoft says it does
/output file_name Specifies the path and file name to store the battery report HTML
/output file_name /xml Formats the battery report file as XML
/duration days Specifies the number of days to analyze for the report

Microsoft's own examples are powercfg /batteryreport /output "batteryreport.html" and powercfg /batteryreport /duration 4. Microsoft's page does not say the command needs an elevated prompt (it does say so for other options such as /systempowerreport), so a normal terminal is the place to start.

Generate the battery report

Quick method

  1. Right-click Start and select Terminal (or Windows Terminal). Command Prompt and PowerShell also work.
  2. Run:
powercfg /batteryreport
Enter fullscreen mode Exit fullscreen mode
  1. The command prints the path of the saved file. Microsoft says it generates an HTML report file in the current path, so the file is saved in whichever folder the terminal is in when you run it. Read the printed path rather than assuming a location.

If the command reports an error about writing the file, choose a folder you own with /output, shown next.

Where is battery-report.html saved and how to open it

Microsoft documents the default location only as "the current path": without /output, the HTML report is written to the folder your terminal is currently in. To see which folder that is, run pwd in PowerShell or cd in Command Prompt, or read the path the command prints. Open the file by double-clicking it in File Explorer, by dragging it into a browser, or with Invoke-Item as shown below. The file is normally named battery-report.html; Microsoft's page does not state the default name, so if the command prints a different name, use that one.

Choose where the file is saved with /output

The /output option sets the path and file name:

New-Item -ItemType Directory -Path C:\Temp -Force | Out-Null
powercfg /batteryreport /output "C:\Temp\batteryreport.html"
Invoke-Item "C:\Temp\batteryreport.html"
Enter fullscreen mode Exit fullscreen mode

Invoke-Item opens the file in your default browser. Create the folder first if it does not exist, as the first line does.

Limit the period or save XML

Microsoft documents two more options for this command:

powercfg /batteryreport /duration 14
powercfg /batteryreport /output "C:\Temp\batteryreport.xml" /xml
Enter fullscreen mode Exit fullscreen mode

/duration sets the number of days to analyse. /xml formats the report as XML, which is easier to process with scripts. Use the HTML for reading.

Read the report

The report opens with general information about the computer, then moves to the battery. The key section describes the installed battery.

Design capacity and full charge capacity

Microsoft's Windows API documentation defines the two values you need:

Value Meaning
Design capacity The estimated energy capacity of a new battery of this type
Full charge capacity The fully charged energy capacity of the battery now

Microsoft's API property names give both in milliwatt-hours (mWh), and the report shows the same two figures for each installed battery. A new battery has a full charge capacity close to its design capacity. Over time, full charge capacity falls as the battery ages.

Design capacity, full charge capacity and cycle count

Report field What it tells you Documented by Microsoft?
Design capacity Estimated energy capacity of a new battery of this type Yes, BatteryReport API
Full charge capacity Fully charged energy capacity of the battery now Yes, BatteryReport API
Cycle count How many charge cycles the battery reports Not defined in the pages we opened; the value comes from the battery controller and can vary by maker, so check your laptop maker's guidance

Full charge capacity falling below design capacity is the wear signal. Cycle count is context, not a verdict: use it with the capacity percentage, not instead of it.

Calculate battery health

Use this simple formula:

Battery health (%) = Full charge capacity / Design capacity x 100
Enter fullscreen mode Exit fullscreen mode

For example, with a design capacity of 50,000 mWh and a full charge capacity of 40,000 mWh, health is 80 percent. Those numbers are an illustration, not a measurement from a real machine.

You can calculate it in PowerShell too:

$design = 50000
$full   = 40000
[math]::Round($full / $design * 100, 1)
Enter fullscreen mode Exit fullscreen mode

Replace the two values with the numbers from your report, without commas.

Other sections

The report also contains tables for how the laptop has used its battery. Typical sections include recent usage, battery usage over the last days, usage history, battery capacity history and battery life estimates. Look at the capacity history if you want to see wear over weeks or months rather than one reading, and the usage sections to see how long the battery actually lasted on recent days.

Some labels vary by Windows version and manufacturer. If you do not see a particular section, rely on the capacity numbers and your own experience of runtime.

Decide whether to replace the battery

There is no universal Microsoft threshold. Use the report together with these checks.

Evidence What it suggests
Full charge capacity close to design capacity, but runtime is short Software or settings are using more power. Review Power mode, brightness and background apps first.
Full charge capacity well below design capacity The battery has aged. Replacement will restore runtime.
Full charge capacity falls sharply from one report to the next Check the battery condition promptly and consider service.
The laptop shuts down suddenly with charge showing A worn battery or a calibration problem is possible. Get it checked.
The battery is swollen, the case is bulging or the trackpad lifts Stop using and charging it, and take it to a service centre.

Check your laptop's warranty and the manufacturer's support page. Many makers define what counts as a battery defect, and the rules differ by brand and country. Use the report as supporting evidence when you speak to support.

Try software fixes first

Microsoft's guidance for saving battery life includes choosing a more efficient power mode, shortening the screen-off and sleep timers, using battery saver, and closing apps you are not using. In Windows 11 the power mode is under Settings, System, Power and battery, and Microsoft says you can choose a different option for Plugged in and On battery. The Energy recommendations panel on the same page can apply several power-saving settings at once. See /blog/laptop-fan-noise-loud-fix-cleaning for how power mode also affects heat and fan noise.

Replacement options

Replacing the battery is often cheaper than replacing the laptop. Use the manufacturer's service centre or an authorised repairer, and a battery that matches the model. Some thin laptops have the battery glued in, which makes DIY replacement difficult and risky; if the maker gives a service guide for your model, use it. Check the price from the maker's official page at the time you decide, as prices change.

Verify and track over time

  1. Save the first report and note the date, design capacity, full charge capacity and your health percentage.
  2. Run the command again every few months and compare the new full charge capacity with the old one.
  3. A steady slow decline is normal. A sudden drop deserves attention.

Keep the HTML files in a folder named by date, for example batteryreport-2026-10-28.html, so you can compare them later.

Troubleshooting

Problem What to try
Battery report not working or file not found Read the path the command printed and open that exact file. Create a folder such as C:\Temp, then run powercfg /batteryreport /output "C:\Temp\batteryreport.html". A file in an unexpected folder is the usual cause, because the default is the current path.
Command not recognised Open Terminal or Command Prompt and type powercfg /? to confirm the tool is present. It is part of Windows.
No report file appears Check the printed path, or use /output with a full path such as C:\Temp\batteryreport.html.
Access denied when saving Save to a folder you own with /output.
Design capacity equals full charge capacity Some battery controllers report poorly. Compare with real-world runtime.
Full charge capacity looks far too low A transient reading can occur. Charge fully, leave the laptop for a while and run the report again. Update the BIOS and chipset drivers from the maker.
The report has no battery section The device may be a desktop or a virtual machine, or the battery controller may not report values.
Capacity shows normal but battery drains fast Look for background apps in Settings, System, Power and battery, and check energy settings and screen brightness.

Checklist

  • Charge the laptop fully and close heavy apps.
  • Run powercfg /batteryreport /output "C:\Temp\batteryreport.html" and open the file.
  • Note design capacity and full charge capacity, and calculate the percentage.
  • Compare with your real-world runtime and with older reports.
  • Try power mode, brightness and background-app changes first.
  • Contact the maker or an authorised service centre if capacity is low or the battery is swollen.
  • Repeat every few months and keep the reports.

See also

What we checked

  • Opened the Powercfg command-line options page on learn.microsoft.com on 2026-11-24 and confirmed the /batteryreport syntax, the /output file_name, /xml and /duration days arguments, and the statement that the command generates an HTML report file in the current path.
  • Confirmed on the same page that its documented examples are powercfg /batteryreport /output "batteryreport.html" and powercfg /batteryreport /duration 4, and that the administrator-privileges note appears for /systemsleepdiagnostics and /systempowerreport but not for /batteryreport.
  • Opened the BatteryReport class page on 2026-11-24 and cross-checked the design capacity and full charge capacity definitions and the note that properties return null when the battery is not present or not reported by the controller.
  • Recalculated the worked example: 40,000 / 50,000 x 100 = 80 percent.
  • Not verified: the default file name, the exact report layout and the meaning of cycle count are not defined on those Microsoft pages, so they are described cautiously. Not tested on a physical laptop; steps follow Microsoft's documentation as of 2026-11-24.

Last tested: 2026-11-24

References


This guide was researched and drafted with AI assistance and checked against the vendor documentation listed in its References. Read the maintained version and related guides on EpiFive.

Top comments (0)