The rise in heart disease among the general population is alarming. This is because cardiovascular disease is the leading cause of death, and several studies have been conducted to assist cardiologists in identifying the primary cause of heart disease. The classification accuracy of single classifiers utilised in most recent studies to predict heart disease is quite low. The accuracy of classification can be enhanced by integrating the output of multiple classifiers in an ensemble technique. Even though they can deliver the best classification accuracy, the existing ensemble approaches that integrate all classifiers are quite resource-intensive. This study thus proposes a stacking ensemble that selects the optimal subset of classifiers to produce meta-classifiers. In addition, the research compares the effectiveness of several meta-classifiers to further enhance classification. There are ten types of algorithms, including logistic regression (LR), support vector classifier (SVC), random forest (RF), extra tree classifier (ETC), naïve bayes (NB), extreme gradient boosting (XGB), decision tree (DT), k-nearest neighbor (KNN), multilayer perceptron (MLP), and stochastic gradient descent (SGD) are used as a base classifier. The construction of the meta-classifier utilised three different algorithms consisting of LR, MLP, and SVC. The prediction results from the base classifier are then used as input for the stacking ensemble. The study demonstrates that using a stacking ensemble performs better than any other single algorithm in the base classifier. The meta-classifier of logistic regression yielded 90.16% results which is better than any base classifiers. In conclusion, we could assume that the ensemble stacking approach can be considered an additional means of achieving better accuracy and has improved the performance of the classification.