BACKGROUND: The viral shedding duration of severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) has not been fully defined. Consecutive detection of SARS-CoV-2 RNA from respiratory tract specimens is essential for determining duration of virus shedding and providing evidence to optimize the clinical management of coronavirus disease 2019 (COVID-19). RESEARCH QUESTION: What are the shedding durations of SARS-CoV-2 RNA in the upper and lower respiratory tract specimens? What are their associated risk factors? STUDY DESIGN AND METHODS: A total of 68 patients with COVID-19 admitted to Wuhan Taikang Tongji Hospital and Huoshenshan Hospital from February 10, 2020, to March 20, 2020, were recruited. Consecutive SARS-CoV-2 RNA detection from paired specimens of nasopharyngeal swab (NPS) and sputum were carried out. The clinical characteristics of patients were recorded for further analysis. RESULTS: SARS-CoV-2 RNA was detected from NPSs in 48 patients (70.6%), and from sputum specimens in 30 patients (44.1%). The median duration of viral shedding from sputum specimens (34 days; interquartile range [IQR], 24-40) was significantly longer than from NPSs (19 days; IQR, 14-25; P < .001). Elderly age was an independent factor associated with prolonged virus shedding time of SARS-CoV-2 (hazard ratio, 1.71; 95% CI, 1.01-2.93). It was noteworthy that in 9 patients, the viral RNA was detected in sputum after NPS turned negative. Chronic lung disease and steroids were associated with virus detection in sputum, and diabetes mellitus was associated with virus detection in both NPS and sputum. INTERPRETATION: These findings may impact a test based clearance discharge criteria given patients with COVID-19 may shed virus longer in their lower respiratory tracts, with potential implication for prolonged transmission risk. In addition, more attention should be given to elderly patients who might have prolonged viral shedding duration.