Inspiration
Health insurance in the U.S. can be confusing and expensive. Many people don’t know why their premiums are higher or lower, or how their personal choices affect costs.
We wanted to create a web app that helps people understand what drives insurance costs and lets them explore different scenarios to make better decisions. It is designed to be easy to use and educational, so anyone can learn about insurance pricing while exploring their options.
What It Does
The app asks users for a few basic details:
- Age
- Sex
- BMI
- Number of children
- Smoking status
- Region
It then predicts an estimated yearly insurance cost based on real-world data. Users can also try “what-if” scenarios, like seeing how quitting smoking or lowering BMI might change their costs.
How We Built It
- Dataset and Machine Learning: We used the Medical Insurance Dataset. We cleaned the data, turned categories into numbers, and trained a RandomForestRegressor to make predictions.
- Backend: Flask handles the app and predictions, and provides an API for live updates.
- Frontend: HTML, CSS, and JavaScript make a multi-step form with interactive sliders for “what-if” scenarios.
- Generative AI: Helped us plan the website structure and layout quickly.
Challenges
- Hosting the website live was hard under hackathon time limits.
- Making the predictions update smoothly in the interface required careful JavaScript and API work.
- Showing which factors affect cost in a clear way was tricky.
Achievements
- Built a working full-stack app that predicts insurance costs.
- Created an easy-to-use, interactive interface for users.
- Added live “what-if” sliders so users can explore how changes in lifestyle affect their insurance.
What We Learned
- How to use a dataset to make predictions.
- How to connect a machine learning model to a web app.
- That smoking and BMI are the biggest factors affecting insurance costs.
- How good UX design can make complex data easy to understand.
Next Steps
- Deploy the app to a live server so anyone can use it.
- Add more explainability to show users why each factor affects costs.
- Directly connect with insurance providers to get exact costs.
Built With
- css3
- flask
- html5
- javascript
- jinga
- kaggle
- python

Log in or sign up for Devpost to join the conversation.