The compressive strength of shale is a comprehensive index for evaluating the shale strength, which is linked to shale well borehole stability. Based on correlation analysis between factors (confining stress, height/diameter ratio, bedding angle, and porosity) and shale compressive strength (Longmaxi Shale in Sichuan Basin, China), we develop a dimension analysis-based model for prediction of shale compressive strength. A nonlinear-regression model is used for comparison. A multitraining method is used to achieve reliability of model prediction. The results show that, compared to a multi-nonlinear-regression model (average prediction error = 19.5%), the average prediction error of the dimension analysis-based model is 19.2%. More importantly, our dimension analysis-based model needs to determine only one parameter, whereas the multi-nonlinear-regression model needs to determine five. In addition, sensitivity analysis shows that height/diameter ratio has greater sensitivity to compressive strength than other factors.