Background Resection margin (RM) involvement is associated with negative prognosis after gastrectomy. Intraoperative frozen section (IFS) analysis allows radical resection to be achieved in a single operation but is timeconsuming and resource-consuming. The aim of this study was to assess risk factors associated with RM involvement to identify patients who would benefit from IFS analysis. Methods We retrospectively analyzed patients who underwent gastrectomy with curative intent for gastric or esophagogastric junction (EGJ) cancer from 2000 to 2014 in six Italian hospitals. RM status was assessed by IFS analysis and/or definitive histopathology examination. A set of 21 potential risk factors were compared in a multivariate analysis between patients with positive RMs on IFS analysis or definitive histopathology examination and a control cohort of similar patients with negative RMs, with the samples stratified into three subgroups (T1, T2-T4 Lauren intestinal pattern, T2-T4 Lauren diffuse/mixed pattern). Results One hundred forty-five patients had positive RMs. Survival was significantly worse in positive RM patients than in negative RM patients (89.5 months vs 28.9 months). Multivariate analysis showed that in T1 cancers a margin distance of less than 2 cm is a risk factor for RM involvement (odds ratio 15.7), in T2-T4 intestinal pattern cancers, serosa invasion (odds ratio 6.0), EGJ location (odds ratio 4.1), and a margin distance of less than 3 cm (odds ratio 4.0) are independent risk factors, and in T2-T4 diffuse/mixed pattern cancers, lymphatic infiltration (odds ratio 4.2), tumor diameter greater than 4 cm (odds ratio 3.5), EGJ location (odds ratio 2.8), and serosa invasion (odds ratio 2.2) are independent risk factors. Conclusions Survival after gastrectomy is negatively affected by positive RMs. IFS analysis should be routinely used in patients with a high risk of positive RMs, especially in diffuse pattern cancers.