The prognosis for gastric cancer (GC) remains grim, underscoring the importance of accurate staging and treatment. Given the potential benefits of using lymph node ratio (LNR) for improved prognostication and treatment planning, it is critical to incorporate examined lymph nodes (ELN) count in an integrated GC staging system. Patients data from the Surveillance, Epidemiology, and End Results (SEER) database between 2010 and 2015 was utilized as training set. The Mantel-Cox survival test was used to calculate chi-square values for 40 LNR segments with a 0.025 interval, defining a novel LNR-based N (rN) classification based on the cutoff points. A revised AJCC (rAJCC) staging system was established by replacing the 8th AJCC N staging with a rN classification. The relationship between the ELN count and prognosis or positive lymph node detection was conducted by using multivariable models. The series of the odds ratios and hazard ratios were fitted with a locally weighted scatterplot smoothing (LOWESS) smoother, and the structural break points were determined by Chow test to clarify an optimal minimum ELN count. The integrated GC staging system incorporated both rAJCC system and the ideal ELN count. Discriminatory ability and prognostic homogeneity of the rAJCC and integrated staging system was compared with AJCC staging system in the SEER validation set (2016-2017), the Cancer Genome Atlas Program (TCGA) database, and the Third Affiliated Hospital of Sun Yat-sen University database. The current study found that LNR and ELN count are both significantly associated with the prognosis of GC patients (HR = 0.98, p < 0.001 and HR = 2.51, p < 0.001). Four peaks of the chi-square value were identified as LNR cut-off points at 0.025, 0.175, 0.45 and 0.6 to define a novel rN stage. In comparison to the 8th AJCC staging system, the rAJCC staging system demonstrated significant prognostic advantages and discriminatory ability in the training set (5-Y OS AUC: 71.7 vs. 73.0; AIC: 57,290.7 vs. 57,054.9). The superiority of the rAJCC staging system was confirmed in all validation sets. Using a LOWESS smoother and Chow test, a threshold ELN count of 30 was determined to maximum improvement in the prognosis of node-negative patients without downgrading due to potential metastasis, while also maximizing the detection efficiency of at least one involved lymph node. The integrated staging system, combining the refined rAJCC classification with an optimized ELN count threshold, has demonstrated superior discriminatory performance compared to the standalone rAJCC or the traditional AJCC system. The development of a novel GC staging system, which integrated the LNR-based N classification and the minimum ELN count, has exhibited superior prognostic accuracy, holding promise as a valuable asset in the clinical management of GC. However, it is crucial to recognize the limitations from the retrospective database, which should be addressed in subsequent analyses.