Customer segmentation against sales transaction data using K-Means clustering algorithm. The purpose of this research is to develop and validate a customer segmentation model using an optimized K-Means clustering algorithm to enable more accurate customer grouping based on sales transaction data. The methodology used includes quantitative design combined with experimental techniques, quantitative data analysis, and model validation, where rice sales transaction data from Tegal city traditional market is processed to identify customer segments. The results showed the effectiveness of the optimized K-Means algorithm in grouping customers into three clusters based on purchase characteristics, and C4-SUPER rice proved to be the best-selling among consumers. These insights enable the development of more targeted and personalized marketing strategies, enrich the academic literature on customer data analysis, and move towards the practical application of more effective customer segmentation through the use of advanced analytical technologies