This study presents a prediction technique for the output current of a photovoltaic grid-connected system by using random forests technique. Experimental data of a photovoltaic grid-connected system are used to train and validate the proposed model. Three statistical error values, namely root mean square error, mean bias error, and mean absolute percentage error, are used to evaluate the developed model. Moreover, the results of the proposed technique are compared with results obtained from an artificial neural network-based model to show the superiority of the proposed method. Results show that the proposed model accurately predicts the output current of the system. The root mean square error, mean absolute percentage error, and mean bias error values of the proposed method are 2.7482, 8.7151, and À2.5772%, respectively. Moreover, the proposed model is faster than the artificial neural network-based model by 0.0801 s.