It depends on the calculation you are performing. For instance, if you are seeking to calculate how much VAT would be charged on the output of a good sold at £10 excluding VAT the calculation would be as follows £10 x 20/100= £2
On the other hand if you were trying to find the VAT charged on a VAT inclusive price of a purchased good bought the calculation would be as follows-
For a £12 good- £12 x 20/120= £2 VAT charged. So price excluding VAT was £10.
The basic logic of the calculations is the same as that for profit margin and profit mark-up calculations.