I consistently speak with customers that complain about their laptop’s decreased battery runtime. Unfortunately, all batteries do have a definite lifespan, and will inevitably fail at some point. The upside is that your battery’s lifespan can depend on how you treat it.

The built-in batteries in the unibody MacBook Pro and MacBook Air are designed to last up to 5 years, and you can help your battery make it that long by following some of these maintenance tips:

First of all, always make sure your Apple software is up to date. Apple has released many software updates that improve battery performance.

Second, it is not recommended to keep your laptop plugged in constantly. The electrons in a lithium-based battery need to keep moving occasionally. Fully discharging and charging your battery at least once a month is recommended. You can always pop an event in iCal to remind you each month!

If you are planning on leaving your notebook off and unused for more than six months, it’s recommended that you leave the battery at about a 50% charge. Storing a battery for that long while fully discharged could result in a “deep discharge” state, which would basically render the battery useless.

Storing your notebook in the optimal temperate zone is also recommended. This is defined by Apple to be between 50 and 95 degrees Fahrenheit.

All these battery maintenance tips are directly from Apple’s website. The full article can be read here.