This paper illustrates the pivotal role of K-means clustering in shaping effective e-commerce strategies by identifying customer segments with similar buying behaviors. This leads to targeted marketing, personalized product recommendations, and optimized pricing. The elbow method is employed to enhance cluster count determination. Through K-Means clustering analysis, color-coded points highlight distinct customer groups, aiding strategic decision-making for price and location predictions. Logistic regression, a vital supervised learning algorithm, accurately predicts categorical outcomes like customer purchasing behavior, achieving a 97