Precisely forecasting the levels of [Formula: see text] is crucial for environmental conservation and human health. Thus, it serves as an essential indicator of atmospheric purity. In this paper, a [Formula: see text] concentration prediction model based on random forest and SHAP is proposed using air pollutants and meteorological conditions as the characterizing factors. Initially, pertinent information is gathered and subsequently manipulated, educated, and forecasted through the application of the random forest technique. Then, SHAP is used to explain the degree of influence of each feature in the model and the prediction results. Results of the experiment demonstrate that the random forest-based [Formula: see text] concentration prediction model for the three cities surpass the comparison model in the RMSE, MAE, and [Formula: see text] indicators. Examining SHAP values, the essential elements influencing the [Formula: see text] concentration are pinpointed.