You can put this solution on YOUR website! The gratuity is based on the size of the bill. A fraction of the bill ADDED to the total cost. Tax works the same way but is a different fraction.
EXAMPLE:
Purchase product or service costing $100.
Customary gratuity rate, 20%
Local tax rate 9%,
Total cost including tax and tip: 100+20+9=129 dollars.