This research analyzes customer segmentation through the RFM-D (Recency, Frequency, Monetary, and Diversity) model and the K-Means algorithm. The data comes from sales transactions at Café Z from January 2023 to February 2024, with 10,212 entries. The applied methodology includes several stages: data pre-processing, cleaning, transformation, normalization, and clustering. Clustering validation was carried out using the Davies-Bouldin Index (DBI) to ensure the quality of the clusters formed. The analysis results identified three customer clusters based on purchasing behavior, indicating that the K-Means algorithm effectively groups customers. These findings provide insight for companies to design marketing strategies that are more focused and appropriate to the characteristics of each customer segment. Companies can improve operational efficiency, increase customer satisfaction, and maximize profitability by utilizing this segmentation. This research contributes to optimizing resource allocation and personalizing marketing approaches, ultimately strengthening customer relationships.