Due to the rapid development of e-commerce and increased competition in the retail market of Ukraine, companies are forced to look for new ways to grow their business. One of the options is to optimize business processes, in particular to increase the efficiency of marketing activities. Predicting consumer behavior is one of the most effective methods of optimizing marketing budgets by building processes based on the individual characteristics of each client. The aim of the study was to predict the behavior of online store customers, namely the time before the next order, based on machine learning methods and a comparative analysis of the effectiveness of different modeling algorithms. Five classification algorithms were implemented: linear discriminant analysis, сlassification and regression trees, random forest, support vector machine, k - nearest neighbors and comparative analysis of their efficiency was performed. Given the peculiarities of customer behavior for forecasting time to the next order, it is proposed to consider the following time intervals in the future when the customer makes the next order: up to two months, two to six months, six to fifteen months, and without order. Predicting such intervals allows us to identify customers who are more likely to make the next purchase and focus our advertising budgets on them, or build a customer experience management strategy: activate customers who have left, offer discounts to customers who are going to leave. Peculiarities of classification models quality assessment on the basis of the “confusion matrix” according to the forecasting accuracy indicators “Accuracy”, “F1”, “Recall” and “Precision” is considered. The study allowed us to give preference to the model of classification "random forest". A tenfold cross-validation was used to improve the quality of the simulation. The weighted accuracy of “F1” in the groups “Up to two months” and “two-six months” reached 62.5% and 64.1%, respectively. The developed model should reduce the influence of the human factor on the decision-making process in the construction of marketing strategies.