This question already has an answer here:
Since getting my mb-pro 3 years ago, I've only used it as a desktop. A few times, the battery has kicked-in for a few hours while the power was out. Someday, I might want to task it as a laptop. For the sake of the battery :
Should I be unplugging my mb from the wall just to use the battery?
For how long should I run on battery?
How often should I do this?