In the first part of this article we will go through how the tax/VAT on your receipt is calculated, if you have included tax in your product pricing (Settings > Location & Legal > "All my prices include tax" - "Yes").
First off, it is important to note that the tax is calculated on the product price that excludes tax.
To calculate the product price excluding tax, divide the product price by (1 + the sales tax rate). For example, if the sales tax rate is 6%, divide the product price by 1.06. If the sales tax rate is 25%, divide the product price by 1.25.
To confirm this, let's say we have a product that costs 100 SEK excluding tax. With 25% tax this product should cost 125 SEK. The way to calculate the price without tax is then 125/1,25 = 100 SEK.
For the order below, the price without tax would therefore be 200/1,25 = 160. To confirm that 40 is the correct tax amount (as displayed on the receipt), add 160 (price without tax) + 40 (tax amount) = 200 (the total). If your tax rate is another than 25%, just remember to adjust the dividing number.
Feel free to have a look at this article to see more examples and further explanation of the formula used above: http://www.accountingcoach.com/blog/calculate-sales-tax
Please note, if your prices however do not include tax rate, tax is calculated by: tax = price * tax rate.