How the tip is actually calculated
The math itself is one line: tip = base × (tip percent / 100), then grand total = bill + tip, then per person = grand total / number of people. The arithmetic is trivial. What actually causes confusion is which number counts as the "base."
The total printed at the bottom of a US restaurant receipt almost always already includes sales tax. This calculator treats the number you enter as that tax-inclusive total, then uses the sales tax rate you supply to back out the pre-tax subtotal: subtotal = total / (1 + tax rate / 100). Leave the tax rate at 0% and the subtotal and total collapse to the same number, which is the right answer if you already know you are looking at a pre-tax subtotal or your state charges no sales tax on restaurant meals.
Pre-tax or post-tax: which base is correct
The etiquette convention favors tipping on the pre-tax subtotal. The Emily Post Institute's tipping guide treats sales tax as a government charge that has nothing to do with the quality of service, so it should not inflate the tip base. Servers themselves often prefer the opposite, tipping on the tax-inclusive total, since it pays out slightly more, though the published guidance still sides with the pre-tax convention over the server's preference.
In practice the dollar difference is small at typical US sales tax rates. Combined state and local rates run from 0% (five states charge no statewide sales tax at all) up to just over 10% in the highest-tax states, with a population-weighted national average around 7.5% (Tax Foundation). On a $106 tax-inclusive total with a 6% tax rate and a 20% tip, pre-tax tipping comes to $20.00 and post-tax tipping comes to $21.20, a $1.20 gap. It grows with the tax rate and the bill size, which is why this calculator shows both numbers instead of picking one silently.
Worked example: $106 bill, 6% tax, 20% tip, split two ways
Start from a $106.00 total already including 6% sales tax. Backing out the tax: subtotal = 106 / 1.06 = $100.00, so $6.00 of the $106.00 was tax. A 20% tip on that $100.00 subtotal is $20.00 (versus $21.20 on the full $106.00 total). Using the pre-tax tip, the grand total is $106.00 + $20.00 = $126.00, and split evenly two ways that is $63.00 each.
If the table decides to round each share up to the next $5 instead of paying the exact $63.00, that adds $2.00 more per person ($4.00 total) beyond the calculated tip, which the calculator reports separately so it is clear how much of the extra came from rounding rather than from the tip percentage itself.
How much to tip, by service
There is no legal minimum tip percentage in the US the way there is a minimum wage. The figures below are the Emily Post Institute's published conventions, the closest thing to a US etiquette standard, not a rule anyone can enforce.
Tipping customs outside the US
Tipping norms are not universal, and applying US percentages abroad can misfire in either direction, undertipping where a service charge is legally already included, or overtipping in a country where it reads as awkward rather than generous.