The gut microbiota plays a crucial role in maintaining host health and has a significant impact on human health and disease. In this study, we investigated the alpha diversity of gut microbiota in COVID-19 patients and analyzed the impact of COVID-19 variants, antibiotic treatment, type 2 diabetes (T2D), and metformin therapy on gut microbiota composition and diversity. We used a culture-based method to analyze the gut microbiota and calculated alpha-diversity using the Shannon H' and Simpson 1/D indices. We collected clinical data, such as length of hospital stay (LoS), C-reactive protein (CRP) levels, and neutrophil-to-lymphocyte ratio (NLR). We found that patients with T2D had significantly lower alpha-diversity than those without T2D. Antibiotic use was associated with a reduction in alpha-diversity, while metformin therapy was associated with an increase. We did not find significant differences in alpha-diversity between the Delta and Omicron groups. Length of hospital stay, CRP levels, and NLR showed weak to moderate correlations with alpha diversity. Our findings suggest that maintaining a diverse gut microbiota may benefit COVID-19 patients with T2D. Interventions aimed at preserving or restoring gut microbiota diversity, such as avoiding unnecessary antibiotic use and promoting metformin therapy, may improve patient outcomes.