This study aimed to analyze the impact of primary tumor resection (PTR) on the prognosis of four common primary tumors with liver metastases, and to develop a prognostic model to visualize the PTR benefit rate of patients with liver metastases. Patients diagnosed with colorectal cancer liver metastases (CRLM), pancreatic cancer liver metastases (PLM), gastric cancer liver metastases (GLM), and breast cancer liver metastases (BLM) between 2004 and 2015 were retrospectively reviewed from the Surveillance, Epidemiology, and End Results (SEER) database and assigned to either the surgery or non-surgery groups. A 1:1 propensity score matching (PSM) was performed. Surgical patients who survived longer than the median cancer-specific survival (CSS) time for non-surgery patients constituted the benefit group. Logistic regression was conducted to explore the independent factors affecting surgical benefit, and a nomogram was established. A total of 21,928 patients with liver metastases were included. After PSM for surgery and non-surgery patients, we found that PTR had a significant impact on the overall survival (OS) and CSS of CRLM, PLM, and BLM patients. In CRLM patients, age (p<0.001), primary site (p=0.006), grade (p=0.009), N stage (p=0.034), and histology (p=0.006) affected the surgical benefit. In BLM patients, the independent factors were age (p=0.002), race (p=0.020), and radiotherapy (p=0.043). And in PLM patients, chemotherapy was an independent factor associated with a survival benefit from PTR. PTR improved OS and CSS in patients with CRLM, PLM, and BLM. A predictive model was established to identify suitable candidates for PTR in CRLM patients.