This work aims to compare the compressive strength of CNFs reinforced concrete, cement paste, and cement mortar utilizing machine learning models for prediction before construction. To obtain this goal, the ten supervised regression ML models were executed. The datasets with an experimental foundation consisting of 266, 233, and 196 data points for cement paste, cement mortar, and concrete respectively were set and split into training and testing groups for the model’s execution. There were seven input parameters: cement, water, CNFs, superplasticizer, fine aggregate, coarse aggregate, and age, and one output parameter: compressive strength fc. The results declared that seven models for cement paste, six models for cement mortar, and eight models for concrete had a strong ability to predict compressive strength. According to the sensitivity analysis, water, and cement were the parameters with the largest impacts on predicting the CNFs reinforced cement-based composites, while coarse aggregate was the smallest. It can be concluded that the three XGBR, GBR, and RF models for concrete, three XGBR, DT, and GBR models for cement paste, and three KNN, BR, and RF models for cement mortar were the best prediction models.