Trends in Vitamin B12 Level Testing in Patients on Metformin From 2000 to 2020

Debarati Bhanja, BS | Areeba Zain, MD, MPH | Camille Moeckel, BA | Abdul Waheed, MD, MS, PHS, CPE

PRiMER. 2024;8:33.

Published: 6/11/2024 | DOI: 10.22454/PRiMER.2024.278059


Background and Objectives: Metformin is one of the primary pharmacologic agents for managing type 2 diabetes mellitus (T2DM). However, it has been associated with interference in vitamin B12 absorption and deficiency. Vitamin B12 deficiency and T2DM can present diagnostic challenges for polyneuropathy. Diagnosis is essential for guiding treatment, yet the use of vitamin B12 level testing in this population may have dwindled over time amid changing practice guidelines. This study examines trends over time in the use of vitamin B12 level testing among patients on metformin.

Methods: This retrospective trend analysis used data from TriNetX, a real-world, longitudinal clinical database. Patients treated with metformin from 2000 to 2020 were identified using Rx Concept Unique Identifier codes. The number of patients who underwent vitamin B12 level testing at any time after 1 month from metformin initiation was tabulated. Patients were grouped by the year of B12 level testing. Trends in B12 level testing were assessed using the Jonckheere-Terpstra statistical test (P<.05).

Results: Out of 4,203,020 patients prescribed metformin, 1,055,995 (25.1%) underwent B12 level testing. The highest proportion of patients tested was in 2000 to 2002 (39.6%), while the lowest proportion was in 2018 to 2020 (20.1%). B12 testing utilization declined significantly by 19.5% from 2000-2002 to 2018-2020 (P=.001).

Conclusions: In this study, we found that the use of vitamin B12 level testing in patients on metformin has significantly declined over the years, potentially impacting early detection of B12 deficiency. Future studies with more granular data from real-life practice are recommended to understand the precise reasons and impact of this trend.


Type 2 diabetes mellitus (T2DM) is a chronic insulin-resistant metabolic disorder affecting millions worldwide, with its prevalence steadily increasing globally.1,2 Metformin, a biguanide derivative, remains the first-line pharmacologic agent in the management of T2DM due to its effectiveness in reducing hyperglycemia and improving insulin sensitivity, as well as its comparatively low risk.3 However, its use has been linked to interference in vitamin B12 absorption and deficiency.4-6 Vitamin B12, otherwise known as Cobalamin, plays an important role in various biological processes, including DNA synthesis, erythropoiesis, and maintenance of the nervous system.7 A deficiency can subsequently manifest as a range of clinical symptoms, including peripheral neuropathy, cardiac autonomic neuropathy, neuropsychiatric symptoms, and hematological disorders.8,9

Importantly, both T2DM and vitamin B12 deficiency can give rise to polyneuropathy, leading to diagnostic challenges as overlapping symptoms can confound accurate assessment.4,8 The diagnostic distinction importantly guides appropriate treatment. Distinguishing between the manifestations of T2DM and vitamin B12 deficiency can require vitamin B12 level testing. However, there is concern that B12 level testing in patients on metformin may currently be underutilized;4 this may be leading to misdiagnosis or delay in detection and management of vitamin B12 deficiency-related complications in diabetic patients. This study analyzes a multi-institutional dataset spanning two decades to examine temporal trends in vitamin B12 level testing among patients on metformin for T2DM, highlighting potential shifts in real-world practice and underscoring the need for further research on metformin-associated B12 deficiencies.


Data Source

For this retrospective trend analysis, we used data collected from TriNetX (TriNetX Inc). TriNetX is a real-world, longitudinal clinical database, collating de-identified electronic health records and administrative claims data across 92 health care organizations. TriNetX presents only aggregated counts and statistical summaries of de-identified information. No protected health information or personal data are made available to the users of the platform. The Penn State College of Medicine Institutional Review Board (IRB) has deemed the use of all TriNetX de-identified data as exempt from IRB review and approval under Study ID STUDY00020794.

Cohort Selection and Analysis

We queried the TriNetX database for patients treated with metformin from years 2000 to 2020 based on Rx concept unique identifier (RxCUI) codes. We tabulated the number of patients who underwent vitamin B12 level testing any time after 1 month from metformin initiation with the number of patients diagnosed with vitamin B12 deficiency anemia. Patients were grouped by year of B12 level testing. We used the Jonckheere-Terpstra statistical test (RStudio v2022.12.0) to assess trends in B12 level testing over time.10 Two-sided P values were considered significant at α<0.05.


A total of 4,203,020 patients prescribed metformin met our criteria for analysis; the number of patients prescribed metformin increased from 16,258 in 2000-2002 to 1,342,487 in 2018-2020. Among all patients, 1,055,995 (25.1%) underwent vitamin B12 level testing. The highest proportion of patients who underwent B12 level testing was in 2000-2002 at 39.6%, and the lowest proportion was in 2018-2020 at 20.1%. The B12 testing utilization steadily declined by 19.5% from 2000-2002 to 2018-2020 with statistical significance (P=.001; Figure 1). Despite declining rates of B12 level testing, the percentage of tested patients with B12 deficiency anemia remained relatively constant, declining only 3.4% from 6.9% in 2000-2002 to 3.5% in 2018-2020 (Figure 2).


This retrospective cohort study found that use of vitamin B12 level testing in patients on metformin has significantly declined over the past 20 years, thereby impacting screening and early detection of B12 deficiency in clinical practice. Because T2DM and vitamin B12 deficiency can independently lead to polyneuropathy, these findings are especially important for effective treatment of diabetic patients on metformin with neuropathic onset. In this setting, B12 level screening may help differentiate diabetic neuropathy from B12 deficiency neuropathy. If a patient is found to be deficient, vitamin B12 supplementation offers a simple, safe, and cost-effective means of preventing the development or progression of peripheral nerve damage, anemia, and/or other clinical manifestations of vitamin B12 deficiency.1-4 This study was not designed to explore causes for down-trending B12 testing rates; however, we hypothesized that B12 testing may be underutilized for several reasons.11 First, more and more patients are diabetic on metformin at a younger age. Older patients on metformin have multiple risk factors for B12 deficiency, providing multiple indications for testing. Thus, a possibility is that providers are not testing as frequently in the younger diabetic population. Additionally, a knowledge gap may exist among providers regarding the American Diabetes Association B12 monitoring recommendations, or low prioritization of B12 testing may exist compared to other diabetes guidelines.12

Limitations of the study include its reliance on insurance claims coding, which is primarily designed for billing purposes rather than clinical use. Insurance claims coding simplifies clinical scenarios into standardized codes, which may lead to the loss of clinical information. Human errors in coding, such as miscoding or misinterpretation of clinical documentation, also could lead to inaccuracies. Alternatively, nonstandardized documentation practices across providers and institutions could contribute to inconsistencies in coding. Therefore, further detailed studies are needed to examine trends in neuromodulation pharmacotherapy utilization, incidence rates of vitamin B12 deficiency anemia, and changes in hemoglobin A1C levels over time. Given the nature of this dataset, important clinical information, such as indications for B12 testing, was unavailable. For example, knowing whether symptomology or abnormal blood work prompted B12 testing would have been helpful for analyzing the present findings under these contexts.

Despite these limitations, the study concludes that use of vitamin B12 level testing in patients on metformin has significantly declined between 2000 and 2020. The findings highlight the importance of initial screening and periodic testing of B12 levels in this subset of patients in order to promptly identify and correct any deficiencies with vitamin B12 supplementation. Ultimately, the findings draw attention to the current down-trending B12 testing practices and the potential negative impacts for patients who take metformin. Moving forward, collaborative efforts between health care practitioners and researchers will be crucial for further research on metformin-associated B12 deficiencies. Further studies are needed to ascertain the desirable frequency of assessment of vitamin B12 levels in patients receiving metformin therapy and to develop protocols for screening, prevention, and treatment of metformin-associated vitamin B12 deficiency.


  1. Harreiter J, Roden M. Diabetes mellitus–definition, classification, diagnosis, screening and prevention (update 2019). Wien Klin Wochenschr. 2019;131(suppl1):6-15. doi:10.1007/s00508-019-1450-4
  2. Chatterjee S, Khunti K, Davies MJ. Type 2 diabetes. Lancet. 2017;389(10,085):2,239-2,251. doi:10.1016/S0140-6736(17)30058-2
  3. Mahgoub MO, Ali II, Adeghate JO, Tekes K, Kalász H, Adeghate EA. An update on the molecular and cellular basis of pharmacotherapy in type 2 diabetes mellitus. Int J Mol Sci. 2023;24(11):9328. doi:10.3390/ijms24119328
  4. Infante M, Leoni M, Caprio M, Fabbri A. Long-term metformin therapy and vitamin B12 deficiency: an association to bear in mind. World J Diabetes. 2021;12(7):916-931. doi:10.4239/wjd.v12.i7.916
  5. Ahmed MA. Metformin and vitamin B12 deficiency: where do we stand? J Pharm Pharm Sci. 2016;19(3):382-398. doi:10.18433/J3PK7P
  6. Kim J, Ahn CW, Fang S, Lee HS, Park JS. Association between metformin dose and vitamin B12 deficiency in patients with type 2 diabetes. Medicine (Baltimore). 2019;98(46):e17918. doi:10.1097/MD.0000000000017918
  7. Gille D, Schmid A. Vitamin B12 in meat and dairy products. Nutr Rev. 2015;73(2):106-115. doi:10.1093/nutrit/nuu011
  8. Bell DSH. Metformin-induced vitamin B12 deficiency can cause or worsen distal symmetrical, autonomic and cardiac neuropathy in the patient with diabetes. Diabetes Obes Metab. 2022;24(8):1,423-1,428. doi:10.1111/dom.14734
  9. Sayedali E, Yalin AE, Yalin S. Association between metformin and vitamin B12 deficiency in patients with type 2 diabetes. World J Diabetes. 2023;14(5):585-593. doi:10.4239/wjd.v14.i5.585
  10. Park C, Hsiung JT, Soohoo M, Streja E. Choosing wisely: using the appropriate statistical test for trend in SAS. Western Users of SAS Software 2019 Conference Proceedings. 2019. Accessed February 10, 2022. https://proceedings.wuss.org/2019/175_Final_Paper_PDF.pdf
  11. Longo SL, Ryan JM, Sheehan KB, Reid DJ, Conley MP, Bouwmeester CJ. Evaluation of vitamin B12 monitoring in patients on metformin in urban ambulatory care settings. Pharm Pract (Granada). 2019;17(3):1499. doi:10.18549/PharmPract.2019.3.1499

Lead Author

Debarati Bhanja, BS

Affiliations: College of Medicine, Pennsylvania State University, Hershey, PA


Areeba Zain, MD, MPH - Family Medicine Residency Program, WellSpan, Good Samaritan Hospital, Lebanon, PA

Camille Moeckel, BA - College of Medicine, Pennsylvania State University, Hershey, PA

Abdul Waheed, MD, MS, PHS, CPE - Department of Family Medicine, Dignity Health Medical Group, Creighton University School of Medicine, Arizona

Corresponding Author

Debarati Bhanja, BS

Correspondence: College of Medicine, Pennsylvania State University, Hershey, PA

Email: dbhanja@pennstatehealth.psu.edu

Fetching other articles...

Loading the comment form...

Submitting your comment...

There are no comments for this article.

Downloads & Info


Related Content