Severe acute respiratory syndrome coronavirus type 2 (SARS-CoV-2) ribonucleic acid (RNA) shedding is an important parameter for determining the optimal length of isolation period required for coronavirus disease 2019 (COVID-19) patients. However, the clinical (i.e., patient and disease) characteristics that could influence this parameter have yet to be determined. In this study, we aim to explore the potential associations between several clinical features and the duration of SARS-CoV-2 RNA shedding in patients hospitalized with COVID-19. A retrospective cohort study involving 162 patients hospitalized for COVID-19 in a tertiary referral teaching hospital in Indonesia was performed from June to December 2021. Patients were grouped based on the mean duration of viral shedding and were compared based on several clinical characteristics (e.g., age, sex, comorbidities, COVID-19 symptoms, severity, and therapies). Subsequently, clinical factors potentially associated with the duration of SARS-CoV-2 RNA shedding were further assessed using multivariate logistic regression analysis. As a result, the mean duration of SARS-CoV-2 RNA shedding was found to be 13 ± 8.44 days. In patients with diabetes mellitus (without chronic complications) or hypertension, the duration of viral shedding was significantly prolonged (≥13 days;p= 0.001 andp= 0.029, respectively). Furthermore, patients with dyspnea displayed viral shedding for longer durations (p= 0.011). The multivariate logistic regression analysis reveals that independent risk factors associated with the duration of SARS-CoV-2 RNA shedding include disease severity (adjusted odds ratio [aOR] = 2.94; 95% CI = 1.36–6.44), bilateral lung infiltrates (aOR = 2.79; 95% CI = 1.14–6.84), diabetes mellitus (aOR = 2.17; 95% CI = 1.02–4.63), and antibiotic treatment (aOR = 3.66; 95% CI = 1.74–7.71). In summary, several clinical factors are linked with the duration of SARS-CoV-2 RNA shedding. Disease severity is positively associated with the duration of viral shedding, while bilateral lung infiltrates, diabetes mellitus, and antibiotic treatment are negatively linked with the duration of viral shedding. Overall, our findings suggest the need to consider different isolation period estimations for specific clinical characteristics of patients with COVID-19 that affect the duration of SARS-CoV-2 RNA shedding.