A feature in Apple's iOS 13 iPhone operating system could help prevent the premature aging in iPhone batteries, which causes shorter and shorter battery life over the ownership of an iPhone.

"Optimized battery charging" is meant to prevent the battery from being stressed and aging faster by charging iPhone batteries only to 80%.

It's designed to charge your iPhone with the last remaining 20% only when it predicts you're about to unplug your iPhone.

Visit Business Insider's homepage for more stories.

Apple's iPhone operating system — iOS 13 — comes with a feature designed to prevent your iPhone's battery life from getting shorter and shorter over time.

The feature is simply called "optimized battery charging," and its goal is to prevent your iPhone's battery from staying at a 100% charge for too long. Those who charge their iPhone overnight should take note!

Indeed, batteries age faster when they're under stress, and staying at a 100% charge for long periods of time — like charging overnight every day — is stressful for batteries. Batteries retain less and less energy as they age, resulting in shorter battery lives as your iPhone gets older than when it first came out of the box.

Here's how it works: