Background: This study aimed to understand the prevalence of prediabetes (preDM) and diabetes mellitus (DM) in patients with cancer overall and by tumor site, cancer treatment, and time point in the cancer continuum. Methods: This cohort study was conducted at Huntsman Cancer Institute at the University of Utah. Patients with a first primary invasive cancer enrolled in the Total Cancer Care protocol between July 2016 and July 2018 were eligible. Prevalence of preDM and DM was based on ICD code, laboratory tests for hemoglobin A1c, fasting plasma glucose, nonfasting blood glucose, or insulin prescription. Results: The final cohort comprised 3,512 patients with cancer, with a mean age of 57.8 years at cancer diagnosis. Of all patients, 49.1% (n=1,724) were female. At cancer diagnosis, the prevalence of preDM and DM was 6.0% (95% CI, 5.3%–6.8%) and 12.2% (95% CI, 11.2%–13.3%), respectively. One year after diagnosis the prevalence was 16.6% (95% CI, 15.4%–17.9%) and 25.0% (95% CI, 23.6%–26.4%), respectively. At the end of the observation period, the prevalence of preDM and DM was 21.2% (95% CI, 19.9%–22.6%) and 32.6% (95% CI, 31.1%–34.2%), respectively. Patients with myeloma (39.2%; 95% CI, 32.6%–46.2%) had the highest prevalence of preDM, and those with pancreatic cancer had the highest prevalence of DM (65.1%; 95% CI, 57.0%–72.3%). Patients who underwent chemotherapy, radiotherapy, or immunotherapy had a higher prevalence of preDM and DM compared with those who did not undergo these therapies. Conclusions: Every second patient with cancer experiences preDM or DM. It is essential to foster interprofessional collaboration and to develop evidence-based practice guidelines. A better understanding of the impact of cancer treatment on the development of preDM and DM remains critical.