Anyone who has ever cared for a laptop knows the pain of an ailing battery. First, you're not able to hold a charge for long, and soon you find yourself searching for a replacement. According to Grist.com technology columnist Umbra, there may be a way to avoid that tragic end and prolong the life span of your power source. It involves being just a little more vigilant about when and how you charge your battery.

Your battery life depends on something called depth of discharge, which Umbra defines as "how much of a battery’s power has been used up: 40 percent depth of discharge means it has 60 percent of its life left, and 100 percent means you’ve let the battery run dry." The larger the average depth of discharge on your battery, the fewer charging cycles you’ll get out of your pack. So, if you've made a habit of letting your battery drain to zero before plugging it back in, you’ve likely already done damage to your battery.

Here’s an example. Say you let your battery run dry before recharging it back to 100 percent. That’s one total charging cycle. Doing that habitually means you might get roughly 300 to 500 discharge cycles before it will be time for a replacement.

Here's how to avoid it: Instead of waiting until your battery is gasping for juice from an outlet, allow it to dip to about 40 percent remaining use before plugging it back in. By not exhausting the power, you put less strain on your battery and might be able to get as many as 4700 discharges out of it.

The other tip? Don’t recharge your battery to the full 100 percent. Once it dips to 40 percent, boost it up to about 80 percent and then pull the plug. A battery that’s engorged with power tends to be more stressed, shortening its life span. To maximize survival potential, it may be best to keep your battery powered between 40 and 80 percent capacity at all times. And if you’re chained to a desk and know you’ll be running AC power on a regular basis, it’s probably best to remove the battery entirely if you can.

If this all sounds like a lot of lithium-ion pampering, it is—but the reward is a battery that’ll be working long after your friends have pitched theirs in designated disposal bins.

[h/t Grist]