Leaving a battery in a laptop while using an electrical outlet for long periods of time will keep the battery in a constant state of charging up and that will reduce the life cycle of the battery.
If you do not use your laptop for extended periods of time (a week or more), remove the battery pack from the laptop.
Also fully charge new battery packs before use. New pack needs to be fully charged and discharged (cycled) a few times before it can run at full capacity.
If you use it almost permenantly plugged in,leave the battery out.