Sunlight, specific foods, and the right type of supplement all help raise your vitamin D levels, but small details in how you eat and supplement make a surprisingly large difference in how much your body actually uses. Most adults need 600 to 800 IU of vitamin D daily, though many people fall short, especially during winter months or if they spend most of their time indoors.
Sunlight Is the Primary Source
Your skin produces vitamin D when it’s exposed to UVB rays from the sun. For most people with light to medium skin tones, 10 to 30 minutes of midday sun on your face, arms, and legs a few times a week generates a meaningful amount. Darker skin tones need longer exposure because melanin slows the process. Sunscreen, glass windows, and clothing all block UVB, so sitting by a sunny window doesn’t count.
Geography matters more than people realize. If you live above roughly 37 degrees latitude (think San Francisco, Philadelphia, Athens), the sun’s angle is too low from about November through February to trigger much vitamin D production in your skin. During those months, food and supplements carry the load.
Best Food Sources of Vitamin D
Very few foods naturally contain vitamin D in significant amounts. The richest sources are fatty fish and fish oils. A single tablespoon of cod liver oil delivers 1,360 IU, which is more than most people need in a day. Three ounces of cooked rainbow trout provides 645 IU, and the same amount of sockeye salmon gives you 570 IU.
Beyond fish, the numbers drop sharply. White mushrooms exposed to UV light offer 366 IU per half cup, making them the best plant-based option by far. Regular portabella mushrooms that haven’t been UV-treated contain almost nothing (4 IU per half cup), so check the packaging. A large scrambled egg has just 44 IU, and all of it is in the yolk.
Fortified foods fill part of the gap. A cup of fortified milk (dairy or plant-based) adds 100 to 144 IU, and a serving of fortified cereal typically contributes around 80 IU. But relying on fortified foods alone makes it hard to hit your daily target without eating large quantities. If your diet doesn’t include fatty fish at least twice a week, a supplement is the more reliable path.
D3 Supplements Work Far Better Than D2
Vitamin D supplements come in two forms: D2 (ergocalciferol, derived from plants) and D3 (cholecalciferol, derived from animal sources or lichen). They are not interchangeable. A study published in the Journal of Clinical Endocrinology & Metabolism found that D3 is roughly three times more potent than D2 at raising blood levels over 28 days. Over longer periods, the gap may widen even further, with D3 showing up to nine times the potency of D2.
In practical terms, a 50,000 IU dose of D2 raised blood levels by no more than what 15,000 IU of D3 would achieve. If you’re choosing a supplement, D3 is the clear winner. Most over-the-counter options are D3, but it’s worth checking the label, especially if you’re buying a plant-based or prescription form, which are more likely to be D2.
Take It With Fat for Better Absorption
Vitamin D is fat-soluble, meaning it dissolves in fat rather than water. Your gut absorbs it through the same pathway it uses to absorb dietary fats. Taking a vitamin D supplement on an empty stomach or with a fat-free meal means a significant portion passes through you without being absorbed.
The fix is simple: take your supplement with the fattiest meal of your day. A handful of nuts, a piece of avocado toast, eggs, or any meal cooked with oil provides enough fat to help your body pull the vitamin D into your bloodstream. This one habit can meaningfully increase how much of your supplement actually reaches your tissues.
Magnesium Is the Hidden Key
Here’s something most people don’t know: your body can’t activate vitamin D without magnesium. Vitamin D goes through two conversion steps before it becomes useful. First, your liver converts it into a storage form, and then your kidneys convert that into the active hormone your cells use. Both of those conversion steps require magnesium as a cofactor for the enzymes involved.
Magnesium also plays a role in deactivating vitamin D when levels get too high, acting as a regulator in both directions. If you’re taking vitamin D supplements but your magnesium intake is low, you may not see the improvement in blood levels you’d expect. Good magnesium sources include pumpkin seeds, spinach, black beans, almonds, and dark chocolate. Many adults don’t get enough magnesium from diet alone, so a magnesium supplement (typically 200 to 400 mg daily) can help close that gap.
Conditions That Block Absorption
Certain digestive conditions make it significantly harder for your intestines to absorb vitamin D, even when you’re taking supplements. Crohn’s disease, celiac disease, and cystic fibrosis all impair the gut’s ability to take in fat-soluble vitamins. If these conditions are untreated or poorly managed, standard supplement doses may not be enough.
Weight-loss surgeries, particularly gastric bypass, physically reduce the length of small intestine available for absorption. People who’ve had these procedures often need higher doses and closer monitoring of their levels.
Several common medications also lower vitamin D levels. Steroids like prednisone, certain cholesterol-lowering drugs, seizure medications, and the weight-loss drug orlistat can all interfere with vitamin D metabolism or absorption. If you’re on any of these long-term, your vitamin D needs may be higher than average.
Body Weight Changes How Much You Need
Vitamin D gets stored in fat tissue, and in people with higher body fat, more of the vitamin gets sequestered there instead of circulating in the bloodstream where it’s active. This isn’t a small effect. People with obesity typically need two to three times the standard dose to reach the same blood levels as someone at a normal weight. People who are overweight (but not obese) generally need about 1.5 times the standard dose.
For adults with obesity, that translates to roughly 2,000 to 4,000 IU per day, compared to the standard 600 to 800 IU recommendation. The safe upper limit for adults is 4,000 IU daily, though some people take more under medical supervision. Vitamin D toxicity is rare but real, and it causes a dangerous buildup of calcium in the blood, so going above 4,000 IU on your own isn’t advisable.
A Practical Routine That Covers the Bases
If you want to optimize your vitamin D levels without overthinking it, the most effective approach combines a few simple habits. Take a D3 supplement (not D2) with a meal that contains some fat. Make sure your magnesium intake is adequate, either through diet or a supplement. Eat fatty fish a couple of times a week if you can. And when the weather and your schedule allow, get some midday sun on exposed skin.
If you have a digestive condition, take medications that affect vitamin D, or carry significant extra weight, a standard dose likely isn’t enough. In those cases, a blood test for your 25-hydroxyvitamin D level gives you a clear starting point for figuring out the right dose.

