Tip Calculator Formula
Understand the math behind the tip calculator. Each variable explained with a worked example.
Formulas Used
Tip Amount
tip_amount = bill_amount * tip_pct / 100Total (Bill + Tip)
total = bill_amount + bill_amount * tip_pct / 100Per Person
per_person = split > 0 ? (bill_amount + bill_amount * tip_pct / 100) / split : 0Tip Per Person
tip_per_person = split > 0 ? (bill_amount * tip_pct / 100) / split : 0Variables
| Variable | Description | Default |
|---|---|---|
bill_amount | Bill Amount(USD) | 85 |
tip_pct | Tip Percentage(%) | 18 |
split | Split Between(people) | 2 |
How It Works
How to Calculate a Tip
Formula
Tip = Bill x (Tip% / 100) Total = Bill + Tip Per Person = Total / Number of People
Quick mental math: for 20%, move the decimal one place left and double it. For 15%, find 10% and add half again.
Worked Example
An $85 bill with 18% tip split between 2 people.
bill_amount = 85tip_pct = 18split = 2
- 01Tip = $85 x 0.18 = $15.30
- 02Total = $85 + $15.30 = $100.30
- 03Per person = $100.30 / 2 = $50.15
- 04Tip per person = $15.30 / 2 = $7.65
Ready to run the numbers?
Open Tip Calculator