Vitamin D is known as the “sunshine vitamin” because your body can make it when it’s exposed to the sun. Yet many people are actually lacking this nutrient, even during the summertime.
The majority of people globally, about 60%, don’t get enough vitamin D, according to Dr. Michael Holick, a professor of medicine at Boston University Chobanian and Avedisian School of Medicine. But it’s highly important for the body to function properly.
“It’s not just a vitamin; it actually functions as a hormone … that not only keeps the bones strong and healthy but also has a role for muscle function,” explained Dr. Kendall F. Moseley, medical director of Johns Hopkins Metabolic Bone and Osteoporosis Center. Recent studies have also been looking into how vitamin D may help with “cancer prevention, immune function, cardiovascular disease,” and even dementia.
While some people who don’t get enough vitamin D may experience muscle weakness, bone pain and mood changes, others have no symptoms at all, according to Cleveland Clinic. So it’s important to be aware of factors that could put you more at risk of a deficiency.
We talked to doctors about unexpected reasons why you may be lacking vitamin D, how to know if you’re deficient, and easy ways to boost your levels.
Reason 1: It’s difficult to get enough vitamin D from your diet.
“A healthy diet in general only generates about 100 to 400 international units (IU) of vitamin D per day, which by most standards is not sufficient,” Moseley told HuffPost. “And the types of foods that have vitamin D in them are not always … at the top of one’s menu.”
Foods high in vitamin D include fatty fish (such as tuna, salmon and mackerel), egg yolks, beef liver and cod liver oil. You can also get vitamin D from fortified foods like milk, yogurt and cereal. But it’s still challenging to get enough from diet alone, she said.
Reason 2: Your skin isn’t in direct sunlight that often — even during the summer.
When you’re exposed to sunlight and the ultraviolet B rays (or UVB) hit your skin, it causes your body to produce vitamin D. But there are several barriers that can block these UVB rays from reaching your skin, Moseley explained.
During the winter or in cloudier climates, you will be exposed to less sunlight. Yet even in sunny places or during warmer months, most people are not getting a ton of vitamin D from the sun. The time of day you go outside is a major factor, Holick explained.
“Even in the summertime … if you go outside at 8 or 9 … in the morning and are exposed to sunlight, you will not make any significant vitamin D,” he said. The same goes for after 3 p.m. “It really depends on the zenith angle of the sun,” he added.
Holick developed an app called dminder.info that can tell you how much vitamin D you’re making when you’re outside, depending on the time of day and other factors, and how to stay safe from burns.
The air quality where you live also matters. “If you live in a polluted city, like Los Angeles … the pollutants in the air absorb the vitamin-D- producing-ultraviolet-B-rays, thereby decreasing your ability to make vitamin D,” he said.
Additionally, Moseley added, because of increased awareness of skin cancer, people aren’t sunbathing or exposing themselves to the sun as much as they used to.
Dermatologists recommend protecting your skin from sunburn by seeking shade and wearing sunscreen with at least an SPF 30, as well as sun-protective gear, “such as long sleeves, pants, a wide-brimmed hat and sunglasses with UV protection,” according to the American Academy of Dermatology Association.
It’s important that we use sunscreen for skin cancer prevention, “but it can definitely reduce the vitamin D absorption,” pointed out Dr. Leila Khan, an endocrinologist at Cleveland Clinic who specializes in metabolic bone disease.
Another reason people are exposed to less sunlight: They’re not spending as much time outside as they used to, between working most of the day inside or commuting by car, she added.

Carol Yepes via Getty Images
Reason 3: Your body produces less vitamin D as you get older.
As people age, their skin can have a harder time making vitamin D even despite absorbing the sun’s rays, Moseley said.
“In normal circumstances, when sunlight — specifically UVB rays — hits the skin, it triggers a chemical reaction that converts a cholesterol-like compound (called 7-DHC) into vitamin D,” she explained. “As people age … the skin gradually loses its stores of 7-DHC. Additionally, aging skin becomes thinner and less efficient at responding to UV light.”
Holick added that a 20-year-old can produce two to three times more vitamin D than a 70-year-old when they’re both exposed to the same amount of sunlight.
Reason 4: You have a darker skin tone.
If you have darker skin, you generally have more melanin, a substance in the body that produces skin, eye and hair color, according to the Cleveland Clinic. Melanin absorbs the sun’s UV rays, which provides some protection for the skin but also causes less vitamin D production.
“Also, as you go through the summer and you start to tan, for those [who] can … you will … have a sun protection factor of about two to four,” Holick said. “The amount of sun exposure to make the same amount of vitamin D would [then] require you to be outside two to four times longer.”
Reason 5: You have a chronic health condition or take certain medications.
There are certain medical conditions that may “impair vitamin D absorption,” such as celiac disease, bowel disorders or bariatric surgery, Khan explained.
Fatty liver disease, cirrhosis or chronic liver damage can also affect vitamin D levels.
“The liver converts vitamin D into a form called 25-hydroxyvitamin D,” Moseley explained. “If the liver isn’t working well… this conversion step can be impaired, meaning less usable vitamin D enters the bloodstream.”
People who have kidney disease are also at high risk for vitamin D deficiency, she added.
“The kidneys … take that liver-processed D and convert it into … calcitriol, the hormone that assists with calcium absorption [and] bone health,” she said. But when kidney function declines, it disrupts that process.
Holick added that certain medications, like those used to prevent seizures, “increase the breakdown” of vitamin D and therefore lower your levels.
So how can you get enough vitamin D?
Because it’s very difficult to get enough vitamin D from foods and it’s important to protect your skin from excessive sun exposure, it’s recommended to take a vitamin D supplement if you need to boost your levels.
Vitamin D comes in two main forms: D2 (from plant-based foods) and D3 (from animal products and sunlight), according to the Cleveland Clinic. Khan said D3 is generally recommended because you get “more sustained levels of hormone in the body,” whereas “vitamin D2 can be … more up and down.”
Most people need about 1,000 to 2,000 IU per day, she said. Some may require a higher dose if they have particularly low levels or absorption issues. Because it really depends on the individual, you should work with your doctor on your specific vitamin D needs, Moseley said.
“Vitamins are not regulated by the FDA, so it’s really important not just to take something from the counter without consulting your physician,” Khan said.
Vitamin D is now in many over-the-counter supplements, from multivitamins to energy supplements, so it can be easy for people to overdo it, Moseley pointed out. Vitamin D toxicity can cause problems with the kidneys and high calcium levels, Khan added.
“A lot of patients feel very poorly with too much vitamin D… because they can get … brain fog and fatigue,” Moseley said. “So we certainly don’t want to trade one problem for another.”
