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_percent / 100

Total with Tip

total_bill = bill_amount + tip_amount

Per Person

per_person = total_bill / num_people

Variables

VariableDescriptionDefault
bill_amountBill Amount(USD)85
tip_percentTip Percentage(%)18
num_peopleNumber of People2

How It Works

How Tips Are Calculated

Tip = Bill × Tip% / 100

Total = Bill + Tip

Per Person = Total / Number of People

Common Tip Percentages

  • 15% — Standard service
  • 18% — Good service
  • 20% — Great service
  • 25%+ — Exceptional service
  • Worked Example

    $85 dinner bill, 18% tip, split between 2 people.

    bill_amount = 85tip_percent = 18num_people = 2
    1. 01Tip = $85 × 18% = $15.30
    2. 02Total = $85 + $15.30 = $100.30
    3. 03Per person = $100.30 / 2 = $50.15

    Frequently Asked Questions

    How much should I tip?

    In the US, 15-20% is customary for sit-down restaurants. 18% is a good standard tip.

    Should I tip on the pre-tax or post-tax amount?

    Either is acceptable. Tipping on the pre-tax amount is traditional, but many people tip on the total including tax.

    Ready to run the numbers?

    Open Tip Calculator