The receptor activator of nuclear factor κB ligand (RANKL)/RANK pathway plays an important role in the prognosis of several solid tumor types, but its role in gastric cancer prognosis has been poorly characterized. A total of 116 gastric cancer patients who underwent surgical resection were enrolled in this study. Expressions of RANKL and RANK in gastric cancer tissues were detected using immunohistochemical staining. Thirty-eight patients (33%) showed a high level of RANKL expression and 61 patients (53%) showed a high level of RANK expression. There was a positive correlation between expressions of RANKL and RANK (P=0.014, r=0.221). A high level of RANKL expression indicated shorter overall survival (OS) (P=0.008), and was associated with a higher pathological tumor/lymph node/metastasis (pTNM) stage (P=0.035), while no significant correlation was detected between RANK expression and clinicopathological parameters. RANKL also predicted poor prognosis in patients with high RANK expression (P=0.008) and Bormann's type III/IV (P=0.002). Furthermore, RANKL expression correlated with pTNM stage according to high RANK expression (P=0.009), while no significance was found in patients with low RANK expression (P=1.000). Together, our results revealed that high expression of RANKL could predict worse outcomes in gastric cancer especially combined with RANK detection, and thereby this pathway could be a useful prognostic indicator of gastric cancer.