Predicting the rate of penetration (ROP) is challenging especially during horizontal drilling. This is because there are many factors affecting ROP. Machine learning techniques are very promising in identifying the structural relationships existing between the inputs and target variables; these techniques were recently successfully applied to estimate the ROP in different wellbore shapes and through various formation lithologies. This study is aimed to introduce a random forest (RF) regression model for ROP prediction based on many factors such as the drilling mechanical parameters (torque, pipe speed, and weight on bit), hole cleaning parameters (the drilling fluid flowrate and pump pressure), and formation properties (formation bulk density and formation resistivity). In addition to its superiority in providing accurate results, RF has the advantage of providing interpretable rules. These rules help in understanding the relationships between the regressors and the target variable. Actual field measurements collected during horizontally drilling carbonate formation were used for training and testing the RF model. Unseen data collected from another well were used for validating the optimized model. Using the K-fold validation method, the proposed RF model has proven its superior performance when compared to artificial neural networks and support vector regression models. An illustrative example on a sample of real drilling data is presented to explain how the RF regression model is applied to the drilling data. In addition, developing interpretable regression rules through merging RF results is explained. These rules can guide drilling practitioners in accomplishing drilling projects at minimum time and cost.