Univariate analysis revealed that gender, right upper quadrant abdominal pain, vomiting, abdominal distention, Murphy’s sign, radiating pain, history of gallstones, absolute neutrophil count (N), prothrombin time (PT), comprehensive preoperative imaging diagnosis, as well as levels of albumin (ALB), GGT, alkaline phosphatase (ALK), direct bilirubin (DBIL), and CEA were potential risk factors for the differential diagnosis of XGC and GBC (all P < 0.05). This evidence concerns the gene ALB and gallstones.