Many people enjoy sunny days, but there’s more benefit to them than just providing natural light.

Your body makes vitamin D when direct sunlight converts a chemical in your skin into calciferol, an active form of the vitamin. The Mayo Clinic reported you can also get it from foods, although it’s not naturally found in many of them.

But not everyone gets enough vitamin D, which is important in helping to keep bones from becoming soft.

MedlinePlus reported that older adults are among the groups at risk of vitamin D deficiency “because your skin doesn’t make vitamin D when exposed to sunlight as efficiently as when you were young, and your kidneys are less able to convert vitamin D to its active form.”

Eat This, Not That spoke to experts about how much vitamin D people in every age group should get daily. Adults 18-70 should aim for 15 mcg (600 IU). Foods rich in vitamin D are good options, such as salmon, tuna, egg yolks, fortified orange juice and cereal, and plant-based and dairy milk and yogurt.

Adults over 70, meanwhile, should aim for 20 mcg (800 IU) of vitamin D daily. In this age range, people tend to spend even less time outdoors and the skin’s ability to make vitamin D when exposed to the sun decreases.

“Many older adults have decreased appetite, so it’s difficult to get adequate vitamin D from snacks and meals,” Dawn Jackson Blatner, a registered dietitian and author of “The Superfood Swap” told Eat This, Not That. “Your best bet is likely to take a supplement to ensure you’re hitting the mark.”

Before starting a vitamin D regimen, be sure to talk to your doctor. Certain interactions can occur, including those with drugs treating cholesterol, heart conditions and blood pressure, according to the Mayo Clinic.

To get specialized news and articles about aging in place, health information and more, sign up for our Aging in Atlanta newsletter.