Advice on laptop battery life

You need to know that:

  • Rechargeable Lithium-Ion batteries have a limited life and will gradually lose their capacity to hold a charge, and this is irreversible.
  • Lithium-Ion batteries continue to slowly discharge (self-discharge) even when not in use or while in storage.
  • Avoid completely discharging batteries.
  • Lithium-ion batteries don't like being charged all the way up and run all the way down. Better to do little recharging here and there.
  • Experts advise that after 30 charges, you should allow lithium-ion batteries to almost completely discharge once, but never totally. (But I don't think that most people bother with it.)
  • You can leave your laptop plugged in all the time, and you cannot overcharge it. Most laptops are smart enough to cut the battery out of charging once it's full.

@Harrymc answer is largely correct, but there are additional things you may wish to consider -

  • Lithium batteries age even when not in use - how much depends on temperature and how full it is.
  • Some laptops will allow you to set a maximum charge percentage (in BIOS). A maximum charge of less then say 75% will greatly prolong the life of your battery. You should use this if your laptop is normally left plugged in.
  • Using the charger while battery is plugged in wont typically damage the battery and can prolong the systems life by preventing it from discharging and needing to be recharged. Be aware of CHARGING the battery while using the laptop. This will work fine but can generate more heat - and heat is not ideal for a lithium battery.