To assess age as a continuous variable for the prognosis of patients with nasopharyngeal carcinoma (NPC) receiving radiotherapy. Patients diagnosed with NPC between 2004 and 2016 were extracted from the Surveillance, Epidemiology, and End Results database. The X-tile was used to calculate the optimal cutoff values for age at diagnosis. Age at diagnosis was divided into subgroups based on the cutoff values. Cancer-specific survival (CSS) between age subgroups was assessed using the Kaplan–Meier method. The age cutoff values for CSS were 42 and 70 years. The 5-year CSS was 85.8%, 73.8%, and 67.1% for the ≤42, 43 to 70, and >70 subgroups. Multivariate regression analysis revealed that race, pathology, T stage, N stage, and age were independent prognostic factors. A nomogram based on the prognostic factors showed that the area under the receiver operating characteristic curve was 0.723 (95% confidence interval, 0.697–0.749). The calibration plots showed good agreement for the 5-year CSS between the predicted and actual observations. All patients were divided into 3 groups according to risk score stratification. Kaplan–Meier survival analyses showed that patients in the low-risk cohort had a greater 5-year CSS than those in the medium- and high-risk cohorts (P < .05). Age subgroups of ≤42, 43 to 70, and >70 years may be useful for determining the prognosis of patients with NPC.