Background: The duration of an endoscopic retrograde cholangiopancreatography (ERCP) is influenced by a multitude of factors. The aim of this study was to describe the factors influencing ERCP time and to create a tool for preintervention estimation of ERCP time., Methods: Data from 74 248 ERCPs performed from 2010 to 2019 were extracted from the Swedish National Quality Registry (GallRiks) to identify variables predictive for ERCP time using linear regression analyses and root mean squared error (RMSE) as a loss function. Ten variables were combined to create an estimation tool for ERCP duration. The tool was externally validated using 9472 ERCPs from 2020 to 2021., Results: Mean (SD) ERCP time was 36.8 (25.3) minutes. Indications with the strongest influence on ERCP time were primary sclerosing cholangitis and chronic pancreatitis. Hilar and intrahepatic biliary strictures and interventions on the pancreatic duct were the anatomic features that most strongly affected ERCP time. The procedure steps with most influence were intraductal endoscopy, lithotripsy, dilation, and papillectomy. Based on these results, we built and validated the SW: edish E: stimation of E: RCP T: ime (SWEET) tool, which is based on a 10-factor scoring system (e.g. 5 minutes for bile duct cannulation and 15 minutes for pancreatic duct cannulation) and predicted ERCP time with an average difference between actual and predicted duration of 17.5 minutes during external validation., Conclusions: Based on new insights into the factors affecting ERCP time, we created the SWEET tool, the first specific tool for preintervention estimation of ERCP time, which is easy-to-apply in everyday clinical practice, to guide efficient ERCP scheduling., Competing Interests: The authors declare that they have no conflict of interest., (Thieme. All rights reserved.)