The sun has become a villain of comic book proportions, causing skin cancer and premature aging. In fact, the last time anyone said “I’m working on my tan,” her next sentence was likely “And then I’m getting a body perm.” But recent studies show that vitamin D, which we get from sun exposure, offers real health benefits, and it has slightly softened our stance against sun worship.

Take breast cancer, for example. A recent study by Brigham and Women’s Hospital and Harvard Medical School in Boston found that a combination of vitamin D and calcium could lower the risk of breast cancer in premenopausal women by 40 percent. Another study, conducted at Creighton University in Omaha, Neb., last year, showed that post-menopausal women who took a combination of vitamin D and calcium supplements had a 60 percent lower risk of breast, lung and colon cancers. And that’s not all: “Evidence shows that vitamin D is also important for the prevention of multiple sclerosis, osteoporosis, diabetes and cardiovascular disease,” says Dr. Edward Giovannucci, a professor of nutrition and epidemiology at the Harvard School of Public Health in Boston.

“Vitamin D is essential for us,” says Dr. Richard Thomas, a dermatologist at Vancouver’s Face & Skin Clinic and clinical assistant professor of dermatology at The University of British Columbia in Vancouver. But don’t dash to the beach yet. There are two ways to get vitamin D: from the sun and from your diet.

In the summer, to get enough vitamin D from the sun, all you need to do is “stick your arm out the window for 10 to 15 minutes twice a week,” says Thomas. (A dark-skinned person requires 20 to 30 minutes because the melanin in her skin acts as a natural sunscreen against UVB rays.)

Vitamin D and your diet on the next page…

Summer beauty prep 101: Our get-gorgeous guide
The vitamin D debate: Are we depriving ourselves? The experts weigh in
Mega sunscreens: Is SPF 70 the new SPF 30?

But what about skin cancer? According to Dr. Reinhold Vieth, a professor of nutritional sciences at the University of Toronto, U.S. statistics suggest that there are three deaths related to sun exposure for every 100,000 women. “If the bad side is losing three lives to skin cancer but the good side is saving 10 lives from breast cancer, which would you choose?” asks Vieth. “There’s no question that sun damages the skin, but because recommendations for ‘moderate’ sun exposure are so ambiguous, they don’t mean anything to most people. If people err, it is more likely on the side of too little sun.”

However, you still need to protect yourself, says Thomas. “Most skin cancers are related to sun exposure,” he says. “Most people use a fraction of the recommended amount of sunscreen. An SPF 15 is only a 15 if you apply two milligrams per square centimetre. For most people, an SPF 15 is more like an SPF 3 or 5.” Thomas recommends using sunscreen with a minimum SPF 15 that blocks both UVA (the rays that penetrate deep into the skin and can cause collagen breakdown and melanoma) and UVB light (which produces vitamin D and can cause sunburn). Look for products that contain Mexoryl XL, Parsol 1789 (avobenzone) or Helioplex (a combination of avobenzones that protect against UVA rays).

You can also get vitamin D from your diet. The Canadian Cancer Society recommends getting 1,000 international units (IUs) of vitamin D a day. Supplements – like multivitamins, which contain up to 400 IUs of vitamin D – are a good way to get the nutrient’s perks, especially in winter. UVA rays are present year-round, but Canada doesn’t produce enough UVB light to make vitamin D from November to February, says Thomas. You can also supplement your diet with vitamin D-rich foods like cod-liver oil, oily fish (salmon, sardines) and orange juice.

Is there any difference between the quality of vitamin D you get from the sun and that from supplements? “If you never went outside and only took vitamin D supplements, you’d still get enough vitamin D,” says Thomas, “but what kind of life would that be?”

Read more:
Skin care myths: Skin treatments
Hot head: Your hair needs sun protection too
Beyond the beach: The facts on cosmetics with SPF