Nearly 17.5 million deaths occur due to cardiovascular diseases throughout the world. If we could create such a mechanism or system that could tell people about their heart condition based on their medical history and warn them of any risk than it could be of huge help. In our work, we will use machine learning algorithms to forecast the heart disease risk factor for a person depending upon some attributes in their medical history. The data mining technique Naive Bayes, Decision tree, Support Vector Machine, and Logistic Regression is analyzed on the Heart disease database. The accuracy of different algorithms is measured and then the algorithms are compared.