Inspiration

This project was inspired by my dad. He's approaching 60 years old and currently weighs around 400 pounds. I’ve watched him struggle with his health, and I wanted to create something visual and impactful to help him and others see how their lifestyle choices affect their life expectancy. The goal wasn’t to scare him, but to motivate him. Sometimes, seeing your life in numbers, laid out clearly and interactively, can be the nudge someone needs to start taking things seriously.


What it does

Life Expectancy Calculator is a web app that asks users a series of health and lifestyle questions like age, sleep habits, diet, weight, stress, bowel frequency, and more and calculates their projected life expectancy. It uses hazard-ratio data and known health correlations to estimate how many years the user may have left. The app gives instant feedback with a large animated slider that changes live as you answer or adjust inputs. It also provides five actionable steps tailored to the user, each linked to trusted resources. The result screen is fun, too it shares predictions about what future events you might live to see, like a manned mission to Jupiter’s moons. And you can export your results as a PDF or share a quirky summary on X (Twitter).


How we built it

I built this app using a single one-shot prompt with Bolt.New. The frontend is built with React in dark mode and styled using Tailwind CSS. The form is interactive, animated, and fully keyboard-accessible. It loads a local JSON file of risk multipliers (sourced from reputable global health data), and runs the math using a Web Worker for performance. All calculations and state are handled in-browser for privacy. I included tooltips, inline resource links, unit toggles, light/dark mode switch, and a fun share feature. No backend, no database just a powerful static app.


Challenges we ran into

Creating a truly engaging user experience with so many inputs was tough. The app needed to be comprehensive without overwhelming the user. Balancing accuracy and simplicity meant selecting the right health metrics, managing optional/unknown answers, and organizing questions into logical flows. Making the slider feel alive and responsive took iteration. Ensuring accessibility and offline functionality without inflating the app size was also a challenge, especially for a single-prompt project.


Accomplishments that we're proud of

We’re proud of how much depth and polish I were able to fit into a one-shot build. The real-time feedback, animated interactions, and personalized results make the app feel both professional and approachable. I successfully integrated accessibility, a fully keyboard-navigable interface, and offline support all while keeping the experience fun and insightful. Most of all, I built something that could actually help someone take their health more seriously.


What we learned

We learned how powerful client-side apps can be when optimized well. I also learned the importance of subtle prompt additions for small things progress indicators, subtle animations, and tone of voice that are important when dealing with something as personal as health and mortality.


What's next for Life Expectancy Calculator

Next, we’d love to integrate wearable data from Fitbit or Apple Health to auto-fill certain fields and allow users to track changes over time. Challenge mode where users can compete to increase their life expectancy score would be cool. A “coach mode” for doctors or caregivers to use the app alongside someone they’re helping. And of course, I hope to get my dad to use it and start his journey.

Built With

Share this project:

Updates