The pre-treatment stage of wastewater treatment plants (WWTP), where most of the larger waste, including sand and fat, is removed, is of great importance for the performance and durability of these plants. This work develops a model that predicts the sand content that reaches the plant. For this purpose, data were collected from one operation year of the Villapérez Wastewater Treatment Plant located in the northeast of the city of Oviedo (Asturias, Spain) and the MARS (Multivariate Adaptive Regression Splines) method was used for modelling. The accuracy of the MARS model developed using the determination coefficient is R2 = 0.74 for training data and R2 = 0.70 in validation data. These results indicate that it is possible to predict trend changes in sand production as a function of input variables changes such as flow rate, pH, ammonia, etc. This will prevent the plant from possible operational problems, as actions could be taken, such as starting up more pre-treatment lines or emptying the containers, so that the arrival of the sand can be assumed without any problem. In this way, the possibility of letting sand contents over the established limits pass that could affect the following processes of the treatment plant is avoided.