Differences between target and implanted intraocular lens (IOL) power in Ethiopian cataract outreach campaigns were evaluated, and machine learning (ML) was applied to optimize the IOL inventory and minimize avoidable refractive error. Patients from Ethiopian cataract campaigns with available target and implanted IOL records were identified, and the diopter difference between the two was measured. Gradient descent (an ML algorithm) was used to generate an optimal IOL inventory, and we measured the models performance across varying surplus levels. Only 45.6% of patients received their target IOL power and 23.6% received underpowered IOLs with current inventory (50% surplus). The ML-generated IOL inventory ensured that more than 99.5% of patients received their target IOL when using only 39% IOL surplus. In Ethiopian cataract campaigns, most patients have avoidable postoperative refractive error secondary to suboptimal IOL inventory. Optimizing the IOL inventory using this ML model might eliminate refractive error from insufficient inventory and reduce costs.