Laptop batteries don't have infinite life. By finding out the number of charge and discharge cycles you'll be able to figure out if it's time to change your PC
If you feel like your laptop battery no longer has the range it used to have and your PC suddenly shuts down while you're working, it's likely that it's running out of charge cycles. Don't know what they are? No problem: you just need to understand how lithium batteries that power our PCs, smartphones, tablets and other portable devices (but also electric cars, just to name one) work.
The charging and discharging phase is made possible by some chemical reactions that take place inside the battery, which allow it to accumulate energy to be released later when the device is turned on. When the battery is completely discharged, what in technical jargon is called charge cycle takes place. A process, the latter, that cannot go on forever: in the long run, the lithium ions present in the battery lose their ability to "hold the charge" and become unusable. Usually, laptop batteries have a "life expectancy" that varies between 600 and 800 charge cycles, after which it is advisable to change the battery (or buy a new PC).
To know if it's time to change your laptop battery, therefore, you'll have to find out how many charge cycles your accumulator has done and how many are left before you plan to replace it.
Discovering Windows 10 charge cycles
If you have a Windows 10 laptop, you can check the number of charge cycles it has made thanks to the battery report tool, which automatically generates a report about the battery's health status. To do this, right-click on the Start button (the one with the Windows logo, to be clear) and select the Windows PowerShell (Administrator) entry, confirming your choice and entering your user credentials if prompted. Once this is done, copy and paste into the window the command
powercfg /batteryreport /output "C:battery_report.html"
and press the "Enter" key on your keyboard. Within a few moments a line should appear confirming the success of the operation. If this is the case, open Windows Explorer and in the left column click on This PC and then on the disk labeled "C:". There you'll find an HTML file called battery_report: open it and look for the line "Cycle count".
Discovering macOS charge cycles
Finding information about the health of the battery is a bit more straightforward. While holding down the Option key on the keyboard, click on the apple icon in the top left corner and choose the System Information item. In the window that pops up, choose Energy in the left column and look for the Cycle Count line.