โ† Back to Projects

Tip Calculator

Livetool

A clean, real-time tip calculator that handles bill splitting across multiple people with instant feedback and input validation โ€” built with vanilla JS.

๐ŸŒ Live Site๐Ÿ“ GitHub RepoBy Kyle Parsotan ยท 2021

Problem

Manually splitting bills and calculating tips at a restaurant is error-prone and slow, especially across larger groups with custom tip percentages.

Solution

Built a reactive vanilla JS form that recalculates the per-person tip and total on every input change. Input validation guards against divide-by-zero and non-numeric entries. A reset button clears all fields instantly.

Tech Stack

Frontend
JavaScript (ES6)HTML5CSS3
DevOps
Vercel

Architecture

Frontend

Pure vanilla JS with event listeners on each input field triggering a central calculate() function. Controlled inputs feed a tip-per-person and total-per-person formula: tipAmount = (bill ร— tipPercent / 100) / numPeople. Input validation checks for empty fields, zero people (prevents division by zero), and negative values before rendering results. CSS custom properties manage the color theme; no framework needed.

Backend

None.

Database

None.

Features

Future Improvements

By Kyle Parsotan ยท 2021

Get to Work

Contact me for freelance work, full-time opportunities! I'm always open to discussing new projects, creative ideas, or opportunities to be part of your visions.