provider image
Welcome! You’re in GoodRx for healthcare professionals. Now, you’ll enjoy a streamlined experience created specifically for healthcare professionals.
Skip to main content
HomeHealth ConditionsHeadaches

Can Headaches Be a Sign of a Vitamin or Mineral Deficiency?

Sarah Gupta, MDChristine Giordano, MD
Written by Sarah Gupta, MD | Reviewed by Christine Giordano, MD
Published on March 3, 2025

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. 

Older man with a migraine
JomkwaniStock via Getty Images Plus

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. 

B vitamin deficiency

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. 

B vitamins and headaches

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. 

GoodRx icon

But deficiencies in these vitamins are extremely rare in the U.S. 

Vitamin D deficiency

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 and headaches

Vitamin D deficiency is associated with migraine headaches, tension headaches, and possibly cluster headaches as well.

Magnesium

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. 

Magnesium and headaches

There’s also evidence that magnesium deficiency is linked to tension headaches and migraines.

How can you tell if a headache is caused by a vitamin deficiency? 

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. 

Who is at risk for headaches caused by 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: 

Other risk factors are related to diet and age, such as if you:

In some cases, a healthcare professional may want to do testing to determine if vitamin deficiency is contributing to headaches.

When should you see a healthcare professional about headaches or migraines?

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. 

Frequently asked questions

Can taking too many vitamins cause headaches?

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. 

Can taking a multivitamin cure headaches?

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. 

What other nutrient deficiencies are linked to migraines?

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. 

The bottom line

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. 

why trust our exports reliability shield

Why trust our experts?

Sarah Gupta, MD
Written by:
Sarah Gupta, MD
Sarah Gupta, MD, is a licensed physician with a special interest in mental health, sex and gender, eating disorders, and the human microbiome. She is currently board certified by the American Board of Psychiatry and Neurology.
Patricia Pinto-Garcia, MD, MPH
Patricia Pinto-Garcia, MD, MPH, is a medical editor at GoodRx. She is a licensed, board-certified pediatrician with more than a decade of experience in academic medicine.
Christine Giordano, MD
Christine Giordano, MD, is board-certified in general internal medicine. She received her medical degree from Rutgers New Jersey Medical School and completed residency at Thomas Jefferson University.
View All References (9)

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.

GoodRx Health has strict sourcing policies and relies on primary sources such as medical organizations, governmental agencies, academic institutions, and peer-reviewed scientific journals. Learn more about how we ensure our content is accurate, thorough, and unbiased by reading our editorial guidelines.

Was this page helpful?

Simple Tips to Eat Healthier

Sign up for our GoodRx Diet and Nutrition Newsletter to receive the latest healthy eating advice, recipes, and savings that are most relevant to you.

By signing up, I agree to GoodRx's Terms and Privacy Policy, and to receive marketing messages from GoodRx.

Related Articles