Assessing the compressive strength of concrete is crucial to ensure safety in civil engineering projects. Conventional methods often rely on manual testing and empirical formulae, which can be time-consuming and error-prone, respectively. In this study, the advanced machine learning techniques are employed to predict the concrete strength. The paper explores multiple base models, such as linear regression (including polynomial features up to degree 3), decision trees, support vector machines, and k-nearest neighbors. Hyperparameter tuning is utilized to improve the models and cross-validation is carried out to check any overfitting issues. In addition, artificial neural networks and ensemble learning methods such as voting, stacking, random forest, gradient boosting, and XGBoost are implemented. Two datasets from different sources are utilized in this study. It is shown that models trained on one dataset do not perform satisfactorily on second dataset and vice-versa, due to covariant shift in the datasets. In fact, this approach implied that rather than relying on advanced machine learning models, linear regression gave approximate results. After combining these datasets, the models were successful in generalizing over wider range of features. The results show that gradient boosting achieved the highest accuracy with an R² of 0.93 and an RMSE of 3.54 for the combined datasets. The paper further delves into finding the lower and upper bound of the predictions with 95% confidence interval using bootstrapping technique. The author recognizes the necessity of diverse datasets to improve model generalization. However, if the models are trained on limited datasets, and inference is to be made on those with different distributions of features than training data, then the prediction interval can be the indication of the confidence of the models. Further for inference on new unseen data, Mahalanobis distance is measured to indicate whether the data is outlier, thus improving the reliability.