Background: The incidence of diabetes is increasing rapidly across the globe. India has the highest proportion of diabetic patients, earning it the doubtful distinction of the ‘diabetes capital of the world’. Early detection of diabetes could help to prevent or postpone its onset by taking appropriate preventive measures, including the initiation of lifestyle changes. To date, early identification of prediabetes or type 2 diabetes has proven problematic, such that there is an urgent requirement for tools enabling easy, quick, and accurate diagnosis. Aim: To develop an easy, quick, and precise tool for diagnosing early diabetes based on machine learning algorithms. Methods: The dataset used in this study was based on the health profiles of diabetic and non-diabetic patients from hospitals in India. A novel machine learning algorithm, termed “mixture of expert”, was used for the determination of a patient’s diabetic state. Out of a total of 1415 subjects, 1104 were used to train the mixture of expert system. The remaining 311 data sets were reserved for validation of the algorithm. Mixture of expert was implemented in matlab to train the data for the development of the model. The model with the minimum mean square error was selected and used for the validation of the results. Results: Different combinations and numbers of hidden nodes and expectation maximization (EM) iterations were used to optimize the accuracy of the algorithm. The overall best accuracy of 99.36% was achieved with an iteration of 150 and 20 hidden nodes. Sensitivity, specificity, and total classification accuracy were calculated as 99.5%, 99.07%, and 99.36%, respectively. Furthermore, a graphical user interface was developed in java script such that the user can readily enter the variables and easily use the algorithm as a tool. Conclusion: This study describes a highly precise machine learning prediction tool for identifying prediabetic, diabetic, and non-diabetic individuals with high accuracy. The tool could be used for large scale screening in hopsitals or diabetes prevention programs.