Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: I Made a Tip Calculator (tip-calculator.co)
1 point by atharvtathe 5 months ago | hide | past | favorite | 4 comments



This tip calculator is good when adding the tip to the bill on a credit slip. Easy to get the total wrong in dim lighting with bad eye sight even without a few drinks. There is a math error on this app: Bill $100.10 @25% shows $25.02 tip and $125.13 total. Fixed this on my own tip app https://wwwapp.net/tip. The tortured javascript is listed in the source. This is in case anyone actually tips 25%. There are a lot of people out there that could use it.


Here comes the boomer who learned arithmetic in grade school.

Start with the bill total before taxes and service charge, if any.

Round to the nearest dollar. Divide by ten (move the decimal place one digit to the left):

127.80 -> 128 -> 12.8

15.95 -> 16 -> 1.60

That gives 10%.

5% is half that. 15% add half to the 10%. For 20% double the 10%. OK to round to make the math easier if necessary.

18% is more than 15% but less than 20%, you don’t have to get it exactly.

If in doubt round up.

To split the tip, divide by the number of people paying. Sigh and skip that one person who will deliver a speech on how they never tip as a matter of principle blah blah.

You should only need a calculator or web site for very large parties. Your phone has a calculator.

If this arithmetic proves challenging you should let your parents pay and tip.


Tip calculators have been around forever, and I too have never understood why. The math is easy to do in your head, especially once you realize it doesn't have to be mathematical perfection. Estimation and rounding are fine.


Right, and phones have had a calculator function or app since before smartphones.

I see these apps, and world clocks, all the time. I will guess that some popular programming textbook or online course assigns these tasks -- like why so many houses have vases and bowls obviously made by children at school art class.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: