Sales tax is added at the register as a percentage of the pre-tax price. Rates vary widely by country, state, and even city, so the same item can cost different amounts depending on where you buy it.
How it's calculated
Multiply the pre-tax amount by the tax rate to get the tax, then add it back to get the total. This tool shows all three so you can check a receipt or budget for a purchase.