PROJECT TYPE:
Personal Project
CLIENT:
None
YEAR:
2025
TECH STACK:
Vite + React
Discount Calculator
about.
A beautiful discount calculator that solves the problem of quickly calculating savings while shopping. Features a cute pig emoji, pink theme, and real-time calculations to help smart shoppers make informed purchasing decisions.
challenge.
I often find myself trying to quickly figure out how much I'd save during online sales — so I decided to build a simple calculator that makes that easy (and a little fun!).
Challenges:
Making sure input validation handled decimals and empty fields properly.
Designing a layout that looked friendly and modern without frameworks.
Keeping calculations accurate with proper rounding.
result.
Solution Steps:
Wrote the core formula for discount calculation:
finalPrice = originalPrice - (originalPrice * discountPercentage / 100)Used simple JavaScript DOM manipulation for user input/output.
Styled the app with gradients and rounded cards using CSS for a soft, feminine aesthetic.
Added realistic shopping tips to make it relatable for everyday users.



