This Sunbathing Calculator Tells You How Long You Can Safely Spend in the Sun

It can also calculate what SPF you should be using.

Who among us hasn't spent too much time outdoors and ended up with a sunburn so intense that it hurts to lie in bed at night? No matter how diligent you may be about re-applying sunscreen, maxing out on activities that leave you in the sun — from time spent at the beach to hanging at a theme park with friends — can often leave you looking like a lobster — and prone to damaging health effects. But thanks to a new sunbathing calculator, you could theoretically know exactly how long you can spend in the sun before getting burnt, without your companion having to remind you that you're "getting a little red."

The tool, which was created by Omni Calculator physician, Dr. Małgorzata Koperska, tells you how long you can stay outside based on a handful of key factors. Here's how it works: Input a few details into the calculator — the intensity of the sunlight (low to extreme, based on this sunburn map and the World Health Organization Global Solar UV Index, the altitude where you are, your skin tone (based on the Fitzpatrick Skin Type scale), the SPF of the sunscreen you're using, and whether or not you'll be on water or snow — and the tool will tell you the maximum number of hours (or minutes) that you can safely spend outside.

You can also use the calculator in reverse: Enter the amount of time you plan to spend in the sun, and it will tell you the SPF you should use to best protect your skin (Just leave that field blank to start).

It's easy to use, and can possibly really help protect your skin in the long run. "Sunburns hurt, the peeling skin looks far from sexy, but more importantly, every time you get a sunburn, the risk of getting skin cancer in the future rises," Dr. Koperska said in a statement shared with Teen Vogue. "Even if you're a vitamin D junkie, enjoy the sun safely!"

In addition to consciously limiting your time in the sun, Dr. Koperska shared a few other tips for keeping your skin from turning full tomato this summer: Avoid the sun between 10am and 4pm, keep an eye on the UV index (the higher the number, the more likely you are to get burned), and always wear sunscreen. Be sure to apply your twice when you know you're going to be in the sun: 15-30 minutes before going outside, and once 15-30 minutes after the exposure begins.

It's also worth keeping in mind that the SPF only does its job if you're applying your sunscreen properly or not using enough. "Most people don’t use enough sunscreen, so the real SPF protection they’re getting is about one third of the labeled SPF,” Dr. Steven Q. Wang, a dermatologist and spokesperson for the Skin Cancer Foundation previously told Teen Vogue. “So, if you have a product that says [SPF] 60, you’re really getting an SPF of maybe 20 or 30.” To help make sure you're getting the full value of the SPF, follow instructions on the packaging and from resources like the American Academy of Dermatology on how to apply, making sure to get those commonly missed spots, and supplement with additional sun protection like hats and umbrellas.

As for how much sunscreen to put on, dermatologist and founder of DDF Skincare, Dr. Howard Sobel previously told Teen Vogue that you should aim for an approximately quarter-sized amount for your face, and a ping-pong ball-sized amount for your body. Reapply every two hours, or after you go in the water or sweat.

You can test out the sunbathing calculator for yourself here. See ya never, sunburns.

Let us slide into your DMs. Sign up for the Teen Vogue daily email. Want more from Teen Vogue? Check this out:This Girl’s Ripped Jeans Sunburn Looks So Painful

See the video.