Background: A good prediction model is useful to accurately predict patient prognosis. Tumor–node–metastasis (TNM) staging often cannot accurately predict prognosis when used alone. Some researchers have shown infiltration of M2 macrophages in many tumors, which indicates poor prognosis. This approach has the potential to predict prognosis more accurately when used in combination with TNM staging. The present study aimed to develop and validate a nomogram to predict survival in patients with gastric cancer by combining TNM staging and the degree of M2 macrophage infiltration.Methods: Patients undergoing curative resection for gastric cancer between 2008 and 2013 at our hospital were enrolled and assigned into either the training set or the validation set. M2 macrophage markers were evaluated by immunohistochemical staining. A stepwise method was applied to screen variables associated with patient survival time, and a nomogram was constructed to predict patient survival. Concordance index, calibration curve, and decision curve analysis were used to evaluate the discrimination, calibration, and clinical benefit of the model.Results: A multivariate analysis demonstrated that CD163 expression, TNM staging, age, and gender were independent risk factors for overall survival. Thus, these parameters were assessed to develop the nomogram. In the training, validation, and overall datasets, the concordance index was >0.6. The model showed a high degree of discrimination in all three datasets. The five-year survival calibration curves were a very good fit with standard curves in all three datasets, and the model demonstrated good clinical benefit. The prognostic abilities had threshold probabilities of 10%–38% for one-year survival, 10%–75% for three-year survival, and 35%–80% for five-year survival.Conclusions: We combined CD163 expression in macrophages, TNM staging, age, and gender to develop a nomogram to predict five-year overall survival after curative resection for gastric cancer. This model has the potential to provide further diagnostic and prognostic value for patients with gastric cancer.