The common percentages
In the United States, 15 percent is a common baseline. 18 to 20 percent is standard for good service. 25 percent is generous. These are customs, not rules, and they vary by place and by service.
How the math works
Tip equals the bill multiplied by the percentage. Total equals the bill plus the tip. Per person equals the total divided by the number of people. A 100 bill with a 20 percent tip is a 20 tip, for a 120 total. Split between 4 people, that is 30 per person.
When to tip more, or less
Tip more for careful service, a large group, or a difficult order. Tip less when service falls short, and say why if you can. Rounding up to a round total is fine when it is close to your chosen percentage.
Splitting a bill fairly
Split the total, not just the food. That way the tip is shared in the same proportions as the bill. If one person ordered much more than the others, split by what each person ordered, then add the tip to each share.