1] Open your laptop’s Power management settings in the Control Panel. Go to Settings > Power & sleep > Additional power settings > Change plan settings > Change advanced power settings.

You can also click on the Battery icon > Battery Settings and then follow from there.

2] This will open Power Options Box where individual settings for the battery can be configured.

3] Now go to Battery section of the Power options box, and then under that:

Click on Critical Battery Action and set it to Hibernate.
Next, click on Critical Battery Level and set it to 5% or even lower.

4] Charge your laptop’s battery to 100% and keep it plugged in for the next two hours. The only reason you need to do this is to make sure the battery is at a regular temperature which is otherwise a bit heated during charging. While you can use it, I would suggest not to unless you don’t have a choice.

5] Unplug the charger from the laptop and let it discharge until it automatically hibernates. It will happen exactly when there is 5% battery left as we configured it above.

Tip: If you are not using your laptop while it’s unplugged, it will get into hibernate or sleep mode. Makes sure to disable sleep, screen off and hibernate setting to never.

6] Leave your laptop for as long as possible. When there would be no battery left, the computer will shutdown automatically.

7] Now plug the charger back and charge it up to 100% again.

8] Make sure to restore the default the power settings back to normal once everything is complete. Click on the batter again, get back to power settings, and this time click on Power and Sleep settings to configure everything back to normal.