It happens to the best of us.

You bundle up on a frigid winter day to build a snowman and pull out your phone so you can snap a photo — but your freshly charged device is as dark and lifeless as the snowman’s charcoal eyes.

Blame it on the cold weather. According to Battery University, batteries are like humans in that they function best at room temperature. Performance drops along with temps, and most batteries stop functioning at minus 4 degrees.

Most rechargeable batteries are powered by lithium-ion batteries, which don’t do so hot when it’s cold outside. According to Apple, iPhones and other iOS devices such as iPads operate most efficiently when the ambient temperature is between 32 degrees and 95 degrees.

When the temperature falls below freezing, even charged phones can power off without warning. According to a CNN story, low temps can also cause LCD screens to malfunction and glass surfaces to crack or break.

The good news: Keeping your phone warm will help it stay alive longer. These tips might help.

1. Keep your phone in your pocket. Don’t stash it in a purse or coat — get it as close to your body as (appropriately) possible.

2. Don’t leave it in the car. Are you mental?

3. Put a case on it. You wouldn’t leave the house without a coat on, so neither should your phone. If you want to get fancy, you could invest in a Salt Case, a wallet-sized holder that provides thermal protection.

4. Turn off any apps you aren’t using. They’ll only drain your battery faster.

5. Avoid exposing your phone to cold air whenever possible. There’s no need to Snapchat every snowflake.

6. On cold days, pack an external charger so you’re always ready for an emergency resuscitation.

7. If your phone does go dark, don’t press the power button repeatedly hoping it’ll turn on, especially if the device is cold to the touch. That might cause permanent damage. Instead, bring it inside until it warms to room temperature, and then bring it back to life.