In modern times, obesity has become a significant threat all over the world. Obesity means an unnatural or excessive amount of fat that is present in our bodies. People are constantly moving towards an unhealthy lifestyle, eating excessive junk food, late-night sleep, spend a long time sitting down. Especially, adolescents are being affected because of their unconscious attitudes. It is a medical problem known as a very complex disease. It promotes the spread of complex illnesses, stroke, heart disease, liver cancer. Consequently, as an aware multitude of Bangladesh, we have to move forward to prevent this risk of obesity. The purpose of this paper is to move towards a machine-learning-based pathway for predicting the risk of obesity using machine-learning algorithms. The great thing about this paper is that people will know the risk of obesity and the reasons behind their obesity. We collect more than 1100 data from many varieties of people of different ages and collect information from both are suffering obesity and non-obesity. For this research, we apply nine prominent machine learning algorithms. We used the algorithm of k-nearest neighbor (k-NN), random forest, logistic regression, multilayer perceptron (MLP), support vector machine (SVM), naïve Bayes, adaptive boosting (ADA boosting), decision tree, and gradient boosting classifier, and we have measured the performance of each of these classifications in terms of some prominent performance metrics. From the experimental results, we determine the obesity of high, medium, and low. The Logistic Regression Algorithm achieves the highest accuracy of 97.09% as compared to the other classifiers. In addition, the gradient boosting algorithm gave the poorest accuracy of 64.08% as well as the lowest metric values.