Adding it on, and taking it back out
Adding tax is the easy direction: multiply by the rate and add it on. Taking it out of a price that already includes it trips people up, because the tax was calculated on the smaller net figure, not on the gross one you are holding. Dividing solves it.
A worked example
A gross price of 1,200 at 20% VAT is not 240 of VAT. Divide 1,200 by 1.2 to get a net price of 1,000, which means the VAT inside it is 200. Taking 20% off 1,200 would have overstated the VAT by 40 and understated what you actually earned.
Common questions
How do I take VAT out of a price that already includes it?
Divide by 1 plus the rate, not by the rate. At 20%, divide the gross price by 1.2 to get the net amount; the difference is the VAT. Taking 20% off the gross price gives the wrong answer every time.
My country calls it GST or sales tax. Does that matter?
Not for the arithmetic. GST in India and Australia, VAT in the UK and the Gulf, sales tax in Pakistan — the calculation is identical, only the name and the rate change.
Why is US sales tax not in the list?
Because there is no national rate. It is set by state and often by city too, so pick "Other rate" and enter the combined rate that applies where the sale happens.