Aims: To evaluate the ocular and systemic factors involved in cataract surgery complications in a teaching hospital using artificial intelligence.Methods: One eye of 1,229 patients with a mean age of 70.2 ± 10.3 years old that underwent cataract surgery was selected for this study. Ocular and systemic details of the patients were recorded and then analyzed by means of artificial intelligence. A total of 1.25 billion simulations of artificial intelligence learning and testing were conducted on several variables and a customized model of analysis was developed.Results: A total of 73 complications were recorded in this study. According to the analysis performed, the main factors involved in cataract surgery complications were: a surgeon in training, axial length and intraocular lens power. The model predicted how long surgery would last with an error of <6 min compared to the effective time needed.Conclusions: According to the data here obtained, artificial intelligence could be an interesting option to build customized models able to prevent complications and to predict actual surgery time. The customized algorithm option allows the development of better models adaptable to different units as well as the possibility to be calibrated for the same unit along time.