The association of computed tomography (CT)-derived skeletal muscle index (SMI) and skeletal muscle radiodensity (SMD) with postoperative prognosis in patients with gastric cancer (GC) remains unknown. Therefore, the present study aimed to assess the association between SMI and SMD with 5-year overall survival (OS) and recurrence-free survival (RFS) in patients with GC. SMI and SMD were measured preoperatively in patients who underwent gastrectomy. Patients were categorized into Groups 1 (high SMI and SMD), 2 (high SMI or SMD) and 3 (low SMI and SMD). OS and RFS rates were assessed using Kaplan-Meier analysis and the log-rank test. Among 459 patients, OS and RFS rates were significantly lower in the low-SMD group than in the high-SMD group (OS, 83.4% vs. 88.8%, respectively; P=0.04 and RFS, 80.5% vs. 87.2%, respectively; P=0.02). OS and RFS rates were also significantly lower in Group 3 than in Groups 2 and 1 (P=0.006). Multivariate analysis revealed that a low SMI and SMD (Group 3) was a significant independent prognostic factor for OS [hazard ratio (HR), 2.32; 95% confidence interval (CI), 1.17-4.59; P=0.016] and RFS (HR, 2.28; 95% CI, 1.19-4.37; P=0.013). In summary, low SMI and SMD values may be useful postoperative prognostic indicators for patients with GC.