Percent on the amount entered
The math is three steps: the tip is the entered amount times the percentage, the total is that amount plus the tip, and each person pays the total divided by the headcount. Every figure derives from those same inputs, so changing the percentage or the number of diners recomputes them all at once. No tax is assumed - what you type is what gets the percentage.