This work aimed to investigate and compare the performance of different machine learning models in predicting the compressive strength of concrete using a data set of 1234 compressive strength values. The predictive variables were selected based on their relevance using the SelectKBest method, resulting in an analysis of eight and six predictive variables. The evaluation was conducted through linear correlation studies via simple linear regression and non-linear correlation studies using support vector regression (SVR), random forest (RF), gradient boosting (GB), and artificial neural networks (ANN). The results showed a coefficient of determination (R2) = 0.897 and a root mean square error (RMSE) = 6.535 MPa for SVR, R2 = 0.885 and RMSE = 5.437 MPa for GB, R2 = 0.868 and RMSE = 5.859 MPa for GB and R2 = 0.894 and RMSE = 5.192 MPa for ANN, all for test set and eight predictor variables. The comparison between the machine learning methods revealed significant differences. For instance, ANN stood out with a higher R2 value, demonstrating its remarkable ability to explain the variability in the data. ANN also showed the lowest RMSE value, indicating notable accuracy in the predictions. Although ANN has demonstrated higher performance, GB shows a closer performance, which no differences from a practical application. The choice between these approaches depends on considerations regarding the balance between explainability and accuracy. While GB provides a more in-depth understanding of the relationship between variables, ANN stands out for the accuracy of its predictions.