The longer a laptop battery just passing power through it from the mains, the weaker it becomes. Batteries have been known to die completely for lack of a regular charging and working cycle.
When you buy a new battery, fully charge it and take the machine off the mains and let the battery run until it shuts down the system. Then do the same half a dozen times to teach that battery what it does for a living.