Rice plays a crucial role for the Indonesian people as their primary source of energy and carbohydrates. A decline in rice production can impact food availability. Rice, as the main food crop, and its processed products, are crucial in fulfilling more than 70% of the daily food needs for the Indonesian population. One of the methods that can be used to conduct Clustering analysis on rice productivity and rice in three major provinces of Java Island is by using K-Means algorithm. While the tools used in this research is Python. The evaluation result of Sum of Squared Error (SSE) is 3.4452012710511966, Davies-Bouldin Index (DBI) 0.5811451032787581, Silhouette Coefficient Index (SCI) 0.5581692872789441. The use of the K-Means method with Python successfully grouped rice productivity data into three clusters namely high, medium and low. By using fit_predict from the sklearn library, the rice productivity data in the regions of the three major provinces in Java Island were successfully grouped well and gained deep insights and were influenced by various factors such as cultivation techniques, soil quality, and climatic conditions.