PROJECT TYPE:

Personal Project

CLIENT:

None

YEAR:

2025

TECH STACK:

Vite + React

Discount Calculator

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.

Showcase image
Showcase image
Showcase image
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:

  1. Wrote the core formula for discount calculation:
    finalPrice = originalPrice - (originalPrice * discountPercentage / 100)

  2. Used simple JavaScript DOM manipulation for user input/output.

  3. Styled the app with gradients and rounded cards using CSS for a soft, feminine aesthetic.

  4. Added realistic shopping tips to make it relatable for everyday users.