Proton exchange membrane fuel cell (PEMFC) stacks are widely used in mobile and portable applications due to their clean and efficient model of operation. We propose an ensemble model based on a stacked long short‐term memory model that combines three machine‐learning models, including long short‐term memory with attention mechanism, support vector regression, and random forest regression, to improve the degradation prediction of a PEMFC stack. The prediction intervals can be derived using the dropout technique. The proposed model is compared with some existing models using two PEMFC stacks. The results show that the proposed model outperforms the other models in terms of mean absolute percentage error and root mean square error. Regarding the remaining useful life prediction, the proposed model with the sliding window approach can provide better results.