An accurate assessment of nitrate leaching is important for efficient fertiliser utilisation and groundwater pollution reduction. However, past studies could not efficiently model nitrate leaching due to utilisation of conventional algorithms. To address the issue, the current research employed advanced machine learning algorithms, viz., Support Vector Machine, Artificial Neural Network, Random Forest, M5 Tree (M5P), Reduced Error Pruning Tree (REPTree) and Response Surface Methodology (RSM) to predict and optimize nitrate leaching. In this study, Urea Super Granules (USG) with three different coatings were used for the experiment in the soil columns, containing 1 kg soil with fertiliser placed in between. Statistical parameters, namely correlation coefficient, Mean Absolute Error, Willmott index, Root Mean Square Error and Nash–Sutcliffe efficiency were used to evaluate the performance of the ML techniques. In addition, a comparison was made in the test set among the machine learning models in which, RSM outperformed the rest of the models irrespective of coating type. Neem oil/ Acacia oil(ml): clay/sulfer (g): age (days) for minimum nitrate leaching was found to be 2.61: 1.67: 2.4 for coating of USG with bentonite clay and neem oil without heating, 2.18: 2: 1 for bentonite clay and neem oil with heating and 1.69: 1.64: 2.18 for coating USG with sulfer and acacia oil. The research would provide guidelines to researchers and policymakers to select the appropriate tool for precise prediction of nitrate leaching, which would optimise the yield and the benefit–cost ratio.