Industrial-based application of supercritical CO2 (SCCO2) has emerged as a promising technology in numerous scientific fields due to offering brilliant advantages, such as simplicity of application, eco-friendliness, and high performance. Loxoprofen sodium (chemical formula C15H18O3) is known as an efficient nonsteroidal anti-inflammatory drug (NSAID), which has been long propounded as an effective alleviator for various painful disorders like musculoskeletal conditions. Although experimental research plays an important role in obtaining drug solubility in SCCO2, the emergence of operational disadvantages such as high cost and long-time process duration has motivated the researchers to develop mathematical models based on artificial intelligence (AI) to predict this important parameter. Three distinct models have been used on the data in this work, all of which were based on decision trees: K-nearest neighbors (KNN), NU support vector machine (NU-SVR), and Gaussian process regression (GPR). The data set has two input characteristics, P (pressure) and T (temperature), and a single output, Y = solubility. After implementing and fine-tuning to the hyperparameters of these ensemble models, their performance has been evaluated using a variety of measures. The R-squared scores of all three models are greater than 0.9, however, the RMSE error rates are 1.879 × 10−4, 7.814 × 10−5, and 1.664 × 10−4 for the KNN, NU-SVR, and GPR models, respectively. MAE metrics of 1.116 × 10−4, 6.197 × 10−5, and 8.777 × 10−5errors were also discovered for the KNN, NU-SVR, and GPR models, respectively. A study was also carried out to determine the best quantity of solubility, which can be referred to as the (x1 = 40.0, x2 = 338.0, Y = 1.27 × 10−3) vector.