Several risk factors, such as hypertension, hyperlipidemia, and an irregular heart rhythm, make an early diagnosis of cardiovascular disease challenging. Reducing cardiac risk calls for precise diagnosis and therapy. Clinical practice in the healthcare business is likely to evolve in tandem as a result of advancements in machine learning. Therefore, scientists and doctors need to acknowledge machine learning's significance. The fundamental purpose of this research is to a reliable analyzing Risk Factors for Cardiovascular Disease method that makes use of machine learning. Classifying well-known cardiovascular datasets But, on the other hand, is a job for state-of-the-art machine learning techniques and neural network algorithms. Several statistical and visualization indicators were used to assess the efficacy of the suggested approaches and to determine the optimal machine-learning and neural-network approach. Using these modeling methods acquired high and accurate accuracy on stroke and heart disease prediction.