Endoscopic retrograde cholangiopancreatography (ERCP) and laparoscopic cholecystectomy (LC) are the most important procedures for patients with choledocholithiasis and gallstones. Many studies recommend early LC after ERCP; however, there is still no consensus on the optimal interval between the two. The purpose of this study was to investigate the appropriate timing of LC after ERCP in patients with choledocholithiasis and cholecystolithiasis.We retrospectively reviewed all ERCPs in our institution from November 2014 to August 2021. All eligible 261 patients were divided into ERCP-LC1 (≤3 days), ERCP-LC2 (3-7 days), and ERCP-LC3 (>7 days). We also reviewed 90 patients with elective LC as the LC group. Procedures, treatment outcomes, and postoperative adverse events were evaluated.In a total of 1642 ERCPs, 261 eligible patients were divided into ERCP-LC1 (n = 102), ERCP-LC2 (n = 113), and ERCP-LC3 (n = 46). The ERCP-LC groups had no difference in operation time, postoperative adverse events, and open conversion rate with the LC group, but the total hospital stay and hospital stay after LC were longer than the LC group. There were no differences between the ERCP-LC groups in operation time, hospital stay after LC, open conversion rate, postoperative adverse events, and efficacy. However, LC within 7 days and even 3 days after ERCP had significant advantages in improvement in total length of stay and medical expenses. Furthermore, we also found an increased risk of gallbladder gangrene and perforation in LC >7 days after ERCP.LC within 7 days and even 3 days after ERCP is a safe, effective, and economical method for patients with choledocholithiasis and gallstones.