Heart failure is a major cause of death worldwide. Early detection and intervention are essential for improving the chances of a positive outcome. This study presents a novel approach to predicting the likelihood of a person having heart failure using a neural network model. The dataset comprises 918 samples with 11 features, such as age, sex, chest pain type, resting blood pressure, cholesterol, fasting blood sugar, resting electrocardiogram results, maximum heart rate achieved, exercise-induced angina, oldpeak, ST_Slope, and HeartDisease. A neural network model with four layers (1 input and 1 output) was trained on the dataset and achieved an accuracy of 90% and an average error of 0.009. The most influential factors in heart failure prediction were found to be oldpeak, ST_Slope, sex, fastingBS, chestPainType, exerciseAngina, cholesterol, restingBP, maxHR, restingBP, and age. This study provides a valuable tool for early detection and intervention of heart failure, thereby contributing to the field of health and medicine