General Health

What Causes B12 Deficiency? Risk Factors and Medicines

P
pharmodigital2026
Reviewed by our GPhC-registered team
· 6 min read
What Causes B12 Deficiency? Risk Factors and Medicines

Most people assume B12 deficiency is a diet problem. For some it is — but far more often the issue is absorption: you are eating enough B12, and your body simply is not taking it in. Understanding which applies to you matters, because it changes how it should be treated.

This guide forms part of our complete guide to vitamin B12 deficiency, which covers symptoms, diagnosis and treatment in full.

How B12 absorption actually works

B12 absorption is unusually complicated, which is why so much can interfere with it. It needs stomach acid to release B12 from food, then a protein made in your stomach called intrinsic factor to carry it, and finally a healthy section of small intestine (the ileum) to absorb it. Disrupt any of those three and levels fall regardless of what you eat.

1. Autoimmune gastritis and pernicious anaemia

The most important cause to identify. Here the immune system attacks the stomach cells that make intrinsic factor, so B12 cannot be absorbed properly no matter how much you consume. NICE’s 2024 guideline on B12 deficiency covers this specifically.

This matters enormously for treatment: if pernicious anaemia is the cause, the standard NHS approach is lifelong B12 injections, usually 1mg hydroxocobalamin every two to three months — continued even once symptoms settle. It is not something to manage with shop-bought supplements, and it needs a proper diagnosis through your GP.

2. Long-term medicines — the commonly missed cause

NICE’s guidance specifically flags several medicines associated with low B12. If you take any of these long term, it is worth knowing:

  • Metformin — very widely used for type 2 diabetes
  • Proton pump inhibitors — omeprazole, lansoprazole, pantoprazole and similar
  • H2-receptor antagonists — such as famotidine
  • Medicines for epilepsy, anxiety, nerve pain or gout

The acid-reducing medicines are the ones people are most often on for years without ever having B12 checked. If that is you and you are tired, this is worth raising. Do not stop any prescribed medicine — the answer is to check your levels, not to stop treatment.

3. Diet — vegan and vegetarian eating

B12 occurs naturally almost exclusively in animal foods: meat, fish, eggs and dairy. Plants do not reliably provide it. Anyone eating a vegan diet needs a supplement or genuinely fortified foods, and long-term vegetarians can also become deficient over time. Because the liver stores several years’ worth, deficiency often appears well after the dietary change — which can make the connection easy to miss.

4. Age

Stomach acid production tends to decline with age, so absorption becomes less efficient. Deficiency is more common over 50, and more common again over 65 — often without any dietary change at all.

5. Gut conditions and surgery

  • Coeliac disease and Crohn’s disease — inflammation affecting absorption
  • Gastric or bariatric surgery — reduced stomach capacity and acid, often requiring lifelong monitoring
  • Bowel resection involving the ileum, where B12 is absorbed
  • Small intestinal bacterial overgrowth

6. Increased demand

Pregnancy and breastfeeding raise requirements, and the World Health Organization identifies these groups as among those most at risk. If you are pregnant or breastfeeding, this belongs with your GP or midwife rather than self-treatment.

7. Nitrous oxide use

Worth including because it is increasingly relevant and often missed. Nitrous oxide — sometimes called laughing gas or “balloons” — interferes with how vitamin B12 works in the body, and heavy or repeated recreational use can cause neurological problems even in young, otherwise healthy people.

If this applies to you or someone you know, and there is any numbness, weakness, tingling, balance difficulty or trouble walking, that needs prompt medical assessment — not a routine wellbeing injection. Please contact your GP or NHS 111.

8. Alcohol

Heavy or sustained alcohol use affects both absorption and the liver’s ability to store B12, and often comes alongside a generally poorer diet.

Which cause you have changes the treatment

This is the practical point of working out the cause:

  • Dietary deficiency with an intact gut can often be corrected with oral supplementation or dietary change.
  • Absorption problems — particularly pernicious anaemia — usually need injections, often lifelong, because tablets rely on a pathway that is not working properly.

Read our comparison of B12 injections and tablets

IMPORTANTIf you think you may have pernicious anaemia or another absorption problem, please see your GP for diagnosis. Our B12 injection service supports people who are low in B12 or want a top-up — it is not a substitute for the NHS diagnosis and lifelong regimen that pernicious anaemia requires.
Not sure whether it applies to you?
Our Hampshire pharmacists can talk through your risk factors, your medicines and what is worth checking.

Speak to a pharmacist →

Where B12 comes from in the diet

Worth knowing regardless of the cause. B12 occurs naturally almost exclusively in animal foods:

  • Best sources: liver, beef, salmon, mackerel, sardines, eggs, milk, cheese and natural yoghurt
  • Fortified options: some breakfast cereals, nutritional yeast, and fortified plant milks — check the label, as fortification varies
  • Not reliable sources: most plants, including seaweed and mushrooms, despite what is sometimes claimed

The important caveat: if your problem is absorption rather than intake, eating more B12-rich food will not solve it. That is the distinction this whole page is about.

Foods naturally rich in vitamin B12 including salmon, beef, eggs, milk and cheese.
B12 is found almost entirely in animal foods — which is why plant-based diets need a supplement.

What B12 does, and what improves when levels are restored

B12 makes healthy red blood cells, maintains the myelin coating that protects your nerves, helps release energy from food, and supports brain function and mood. Once a genuine deficiency is corrected, most people find energy lifts first, within one to two weeks; brain fog and mood improve over several weeks; and nerve symptoms such as tingling settle most slowly, over months.

AWARD-WINNING CARESpeak to GPhC-registered pharmacists at Southdowns Pharmacy Group — winners of Pharmacy Services Provider of the Year 2024 (Davies Pharmacy, Independent Pharmacy Awards) and UK Pharmacy Team of the Year 2022.

Frequently asked questions

Can metformin cause B12 deficiency?
Yes — it is one of the medicines NICE specifically associates with low B12. If you take metformin long term, it is reasonable to have your level checked. Do not stop taking it.

Can omeprazole cause B12 deficiency?
Proton pump inhibitors reduce stomach acid, which is needed to release B12 from food, and NICE lists them among the medicines linked to deficiency. Long-term users are worth checking.

Do vegans always need a B12 supplement?
Effectively yes. B12 is not reliably available from plant foods, so a supplement or properly fortified foods are necessary.

What is the difference between B12 deficiency and pernicious anaemia?
Pernicious anaemia is one specific cause — an autoimmune condition stopping absorption. B12 deficiency is the broader result, which has several possible causes.

Is B12 deficiency hereditary?
Pernicious anaemia and other autoimmune conditions can run in families, so a family history is worth mentioning.

This guide is general information and not a diagnosis or a substitute for advice from your GP. Never stop or change prescribed medication without medical advice.

pharmodigital2026
Written by

pharmodigital2026

Part of the GPhC-registered pharmacy team at Southdowns Pharmacy, providing evidence-based health guidance across our Hampshire branches.

Keep Reading

More from our pharmacists