BackgroundTo develop a novel machine learning-based intraocular lens (IOL) power calculation formula for highly myopic eyes.MethodsA total of 1828 eyes (from 1828 highly myopic patients) undergoing cataract surgery in our hospital were used as the internal dataset, and 151 eyes from 151 highly myopic patients from two other hospitals were used as external test dataset. The Zhu-Lu formula was developed based on the eXtreme Gradient Boosting and the support vector regression algorithms. Its accuracy was compared in the internal and external test datasets with the Barrett Universal II (BUII), Emmetropia Verifying Optical (EVO) 2.0, Kane, Pearl-DGS and Radial Basis Function (RBF) 3.0 formulas.ResultsIn the internal test dataset, the Zhu-Lu, RBF 3.0 and BUII ranked top three from low to high taking into account standard deviations (SDs) of prediction errors (PEs). The Zhu-Lu and RBF 3.0 showed significantly lower median absolute errors (MedAEs) than the other formulas (allP< 0.05). In the external test dataset, the Zhu-Lu, Kane and EVO 2.0 ranked top three from low to high considering SDs of PEs. The Zhu-Lu formula showed a comparable MedAE with BUII and EVO 2.0 but significantly lower than Kane, Pearl-DGS and RBF 3.0 (allP< 0.05). The Zhu-Lu formula ranked first regarding the percentages of eyes within ± 0.50 D of the PE in both test datasets (internal: 80.61%; external: 72.85%). In the axial length subgroup analysis, the PE of the Zhu-Lu stayed stably close to zero in all subgroups.ConclusionsThe novel IOL power calculation formula for highly myopic eyes demonstrated improved and stable predictive accuracy compared with other artificial intelligence-based formulas.Supplementary InformationThe online version contains supplementary material available at 10.1186/s40662-023-00342-5.