Key takeaways:
Most headaches aren’t related to nutrient deficiency. But there’s some evidence that deficiencies in B vitamins, vitamin D, and magnesium may contribute to certain types of headaches.
Vitamin deficiencies in the U.S. are rare. But older adults and people with certain health conditions may be at risk.
If a vitamin or mineral deficiency is contributing to your headaches, taking a supplement could potentially help.
Headaches are painful and can have a big impact on your daily life. If you’ve ever spent a day nursing a headache, you may have wondered: Is there anything I could do to have fewer headaches? Could taking a vitamin be the answer?
There are many different types of headache and reasons why people experience them. In some cases, nutrient deficiencies may play a role. Let’s take a closer look at three key vitamin and mineral deficiencies that are linked to headaches and migraines.
There are eight B vitamins that have important roles in metabolism (turning food into energy) and making red blood cells. We get B vitamins through the food we eat. B vitamins are all found naturally in:
Meat
Fish
Eggs
Dairy products
Whole grains
Green, leafy vegetables
B vitamin deficiencies can cause a range of symptoms including fatigue, a tingling sensation in the extremities, and problems with balance.
But can low levels of B vitamins cause headaches? It depends.
Vitamin B12 deficiency can lead to anemia (low red blood cell count). And this can indirectly cause headaches. There’s some evidence that vitamin B1 and vitamin B12 deficiencies may be linked to migraines. Severe vitamin B3 and vitamin B5 deficiencies can cause headaches.
Tips for living with migraines: Podcast host and patient advocate Joe Coe shares his top 10 strategies for managing migraines.
Eating a vegan diet? Here are nine essential vitamins and supplements for vegans to keep an eye on.
Vitamins and minerals for older adults: Learn about 16 essential vitamins and minerals you need to watch as an older adult.
But deficiencies in these vitamins are extremely rare in the U.S.
Vitamin D helps your body absorb calcium. It keeps your nerves, muscles, and immune system strong.
Your body makes vitamin D through sunlight. But you can also get it from eggs, certain types of fish, and liver. Vitamin D is also added to many dairy products.
People who have very low levels of vitamin D may experience bone and muscle pain, slow wound healing, and hair loss.
Vitamin D deficiency is associated with migraine headaches, tension headaches, and possibly cluster headaches as well.
Magnesium is a mineral that’s needed for proper function of your bones, nerves, and muscles. It also helps to regulate your body’s glucose levels.
You can get magnesium from many different types of food, including:
Nuts and seeds
Beans
Tofu
Whole grains
Leafy greens
Dairy products
Dark chocolate
Magnesium deficiency can lead to muscle cramps, tremors, and heart palpitations.
There’s also evidence that magnesium deficiency is linked to tension headaches and migraines.
There’s no easy way to tell if a headache is being caused by a vitamin deficiency. That’s because there are often multiple factors that contribute to headaches. And there’s no specific pain pattern or headache “type” that’s caused by a vitamin deficiency.
Severe nutrient deficiencies are rare in the U.S. But you may be at increased risk of vitamin deficiency due to a medical condition or medications. For example, if you:
Have alcohol use disorder
Take medications that interfere with nutrient absorption
Have had surgery on your stomach or intestines, such as gastric bypass surgery
Have a health problem that affects your body’s ability to absorb fat
Other risk factors are related to diet and age, such as if you:
Eat a vegetarian or vegan diet
Are on a gluten-free diet
Are an older adult
In some cases, a healthcare professional may want to do testing to determine if vitamin deficiency is contributing to headaches.
If you’re having frequent headaches, reach out to your primary care provider. They can help figure out what type of headaches you’re experiencing. And they can work with you to create a treatment plan. In some cases, your primary care provider may suggest additional testing to evaluate you for a vitamin deficiency.
It’s always a good idea to talk to a healthcare professional before starting a new vitamin or supplement. These products may seem “safe” and “natural.” But they can still have side effects. Or they may interfere with other medications you’re taking.
Yes, some vitamins can cause headaches as a side effect — especially if you take too much. Examples include niacin (B3) and vitamin A.
In general, you should only take vitamins under the guidance of a healthcare professional. They can guide you toward a safe dose. And they can help you to keep an eye out for any potential side effects.
It depends. If you’re diagnosed with a vitamin deficiency, supplementing with vitamins could completely “cure” your headaches. But most of the time, the connection between vitamins and headaches isn’t so clear.
There’s some evidence that coenzyme Q10, carnitine, and alpha-lipoic acid deficiencies may be linked to migraines. More research is needed to understand these links and whether or not supplementation could be helpful.
Vitamins and minerals are vital for keeping your body running smoothly. When you’re deficient in one or more nutrients, it can lead to a wide variety of symptoms — including headaches and migraines in some cases.
If you’re having frequent or disruptive headaches, reach out to your healthcare team. They can help figure out whether a vitamin or mineral deficiency could be the culprit. They can also help you understand whether or not taking a supplement could be helpful in getting your headaches under control.
American Migraine Foundation. (n.d.). Thiamine and riboflavin: A closer look on migraine impact.
Maier, J. A., et al. (2020). Headaches and magnesium: Mechanisms, bioavailability, therapeutic efficacy and potential advantage of magnesium pidolate. Nutrients.
MedlinePlus. (2021). B vitamins.
MedlinePlus. (2024). Anemia.
MedlinePlus. (2024). Vitamin D.
Nattagh-Eshtivani, E., et al. (2018). The role of nutrients in the pathogenesis and treatment of migraine headaches: Review. Biomedicine & Pharmacology.
Office of Dietary Supplements. (2021). Niacin. National Institute of Health.
Office of Dietary Supplements. (2021). Pantothenic acid. National Institute of Health.
Office of Dietary Supplements. (2022). Vitamin A and carotenoids. National Institute of Health.
Özek, S. U. (2022). A study on the correlation between pain frequency and severity and vitamin B12 levels in episodic and chronic migraine. Arquivos de Neuro-Psiquiatria.
Sohn, J., et al. (2018). Vitamin D deficiency in patients with cluster headache: A preliminary study. The Journal of Headache and Pain.