What Causes Vitamin B12 Deficiency? Diet, Meds, and More

Vitamin B12 deficiency develops when your body can’t absorb enough B12 from food, doesn’t get enough from your diet, or loses the ability to store it properly. Because the liver holds several years’ worth of B12 reserves, deficiency usually builds slowly, taking 3 to 5 years to cause symptoms after intake drops or absorption fails. That slow timeline means many people don’t realize anything is wrong until the deficiency is well established.

The causes fall into a few broad categories: problems with absorption (the most common), dietary gaps, medications, and surgical changes to the digestive tract. Understanding which category applies to you matters, because the fix is different for each one.

How B12 Absorption Works

B12 has one of the more complicated absorption pathways of any vitamin, which is exactly why so many things can disrupt it. In food, B12 is bound to proteins. When you eat, stomach acid and digestive enzymes separate B12 from those proteins, releasing it into its free form. The free B12 then attaches to a protein called intrinsic factor, which is produced by specialized cells in the stomach lining. This B12-intrinsic factor package travels through the digestive tract until it reaches the terminal ileum, the very last section of the small intestine, where it’s finally absorbed into the bloodstream.

Any breakdown along this chain, too little stomach acid, not enough intrinsic factor, or damage to the ileum, can prevent B12 from reaching your blood. That’s why absorption problems account for far more cases of deficiency than simply not eating enough B12.

Pernicious Anemia

Pernicious anemia is the classic autoimmune cause of B12 deficiency. Your immune system produces antibodies that attack the stomach lining cells responsible for making intrinsic factor. Without intrinsic factor, B12 can’t be absorbed in the small intestine regardless of how much you eat. The antibodies also damage the stomach lining directly, compounding the problem.

Pernicious anemia affects an estimated 151 per 100,000 people in the United States. It’s more common in older adults and in people with other autoimmune conditions like type 1 diabetes or thyroid disease. Because the deficiency is caused by an absorption failure rather than a dietary gap, people with pernicious anemia typically need B12 injections or very high-dose oral supplements rather than just eating more B12-rich foods.

Age-Related Stomach Changes

As people age, the stomach lining gradually thins in a condition called chronic atrophic gastritis. This means fewer functioning cells to produce both stomach acid and intrinsic factor. Without adequate stomach acid, B12 stays trapped in the food proteins it arrived with. Without enough intrinsic factor, whatever B12 does get freed can’t complete the absorption process.

People over 60 are particularly susceptible. The pattern is distinctive: younger people with atrophic gastritis tend to show up with iron deficiency first, while older adults are more likely to develop the kind of B12 deficiency that leads to enlarged, poorly functioning red blood cells. This age-related decline in stomach function is one reason health organizations recommend that older adults get their B12 from supplements or fortified foods, where the vitamin is already in its free form and doesn’t need stomach acid to be released.

Medications That Interfere With Absorption

Two widely prescribed drug classes can reduce B12 absorption over time.

Metformin, the most commonly prescribed medication for type 2 diabetes, is now recognized as a common cause of B12 deficiency. The mechanism involves multiple factors: changes in gut motility, bacterial overgrowth in the small intestine, and reduced B12 uptake in the gut lining. The UK’s medicines regulator classifies B12 deficiency as a common side effect that may affect up to 1 in 10 people taking the drug. If you’ve been on metformin for several years and haven’t had your B12 checked, it’s worth asking about.

Acid-suppressing medications, including proton pump inhibitors and H2 blockers, work by reducing stomach acid production. That’s exactly the acid your body needs to release B12 from food proteins. Short-term use is unlikely to cause problems given how much B12 the liver stores, but years of continuous use can gradually deplete those reserves.

Digestive Diseases Affecting the Ileum

Since B12 is absorbed exclusively in the terminal ileum, any disease that damages or inflames that specific stretch of intestine can cause deficiency. Crohn’s disease is the most notable example, particularly when it involves the ileum, which it frequently does. Inflammation in the terminal ileum doesn’t just block absorption physically. It also appears to increase B12 metabolism at the site, further reducing the amount that makes it into the bloodstream.

Celiac disease, tropical sprue, and other conditions that damage the intestinal lining can also interfere with B12 uptake, though the risk depends on how much of the ileum is affected. People who have had portions of their ileum surgically removed for any reason face permanent absorption challenges and will likely need supplementation indefinitely.

Bariatric Surgery

Weight loss surgeries, particularly gastric bypass and sleeve gastrectomy, significantly increase the risk of B12 deficiency. Both procedures alter the stomach in ways that reduce acid production and intrinsic factor availability. Gastric bypass also reroutes food past portions of the small intestine, further limiting absorption opportunities.

Research tracking patients after surgery found that while blood levels of B12 may not drop noticeably until about six months post-surgery, more sensitive markers of B12 status begin declining within two months. This means functional deficiency can start earlier than a standard blood test would suggest. Lifelong B12 monitoring and supplementation are considered standard care after bariatric procedures.

Dietary Causes

B12 is found almost exclusively in animal products: meat, fish, eggs, and dairy. People who eat little or none of these foods are at genuine risk. Among vegans, studies report deficiency rates ranging from 5% to 52%, with the wide range largely explained by whether people supplement. One UK study found that 52% of male vegans had deficient B12 levels. Vegetarians fare better but aren’t immune, with deficiency rates between 6% and 14%.

The good news is that regular supplementation dramatically reduces these rates. Fortified foods like plant milks, nutritional yeast, and breakfast cereals can also close the gap. The key detail is that dietary B12 deficiency is almost entirely preventable with awareness and a simple daily or weekly supplement. The body absorbs synthetic B12 from supplements without needing stomach acid to release it from food proteins, which makes supplements effective even for people with mild absorption issues.

How Deficiency Is Detected

A standard blood test measuring serum B12 is the usual starting point. Most labs define deficiency as a level below 200 to 250 pg/mL, though the exact cutoff varies by laboratory. The tricky range is between about 150 and 400 pg/mL, where a person might be deficient but not flagged by the basic test. In that gray zone, doctors can check a second marker called methylmalonic acid (MMA), which rises when the body doesn’t have enough usable B12. An elevated MMA level is considered the most sensitive confirmation of true deficiency.

This matters practically because symptoms of B12 deficiency, fatigue, numbness or tingling in the hands and feet, difficulty with balance, brain fog, and mood changes, can appear even when blood levels are technically in the low-normal range. If your B12 level comes back borderline and you have symptoms, asking for the MMA test can provide a clearer answer.

Why It Takes Years to Show Up

Unlike most vitamins, B12 is stored in large quantities in the liver. If you stopped absorbing B12 entirely today, your liver’s reserves would sustain you for roughly 3 to 5 years before deficiency symptoms appeared. This is both a safety net and a trap. It means that whatever caused the problem, a dietary change, a new medication, the slow progression of an autoimmune condition, likely started years before you felt anything. By the time symptoms develop, the deficiency is often significant, and nerve damage from prolonged deficiency can be slow to reverse or, in severe cases, permanent.