Tip = bill × tip %. Total = bill + tip. Each person pays the total divided by the number of people. With rounding on, every share is rounded up to the next whole number, so the extra goes to the tip.
Example: an $86.50 bill with an 18% tip is $15.57 tip, $102.07 total, or $25.52 each for four people.
Many people tip on the pre-tax amount; others tip on the total. Enter whichever amount you prefer as the bill.
In the US, 15-20% is typical for table service. Customs differ by country, and in some places service is already included.
See also: Tip Calculator · Sales Tax · Discount