I'm testing out the Xero sales tax functionality and have run into an interesting issue with how inclusive taxes are being calculated.
I built out a tax rate comprised of 3 tax components. One of these tax components is flagged as compound
Rate AAA = 6%
Rate BBB = 4%
Rate CCC = 2% Flagged as compound
I have an invoice with a single line item with a quantity of 1 and a unit price of $10,000.00. When I select the tax rate and set the amounts are field to tax inclusive it computes the total tax to be $1087.00
When printing this it gives a breakdown showing the amount of tax per rate. It also shows a pre-tax amount for the line item of $8,912.66 In looking at this breakdown there seems to be an issue with the tax amount for Rate B.
The breakdown for Rate B shows a total tax of $356.50 which doesn't math out correctly. If you multiply the pre-tax amount of $8,912.66 by the 4% tax rate you get $356.5064 which when rounded is $356.51. Not really sure how your rounding works here.
I went ahead and calculated the total tax for Rate A and for Rate C.
For rate A I took the pre-tax line amount and multiplied it by 6% to get $534.7596 which when rounded is 534.76. This matched the invoice.
For Rate C I took the tax value for Rate A and for Rate C and added them to the pre-tax line amount to get $9803.92. I then multiplied this by 2% to get the total tax for Rate C. This came to $196.0786 which when rounded came to $196.08. This also matched the invoice.
After calculating this I became even more perplexed because it appears as if there is rounding happening on the invoice however in some situations it rounded up (Totals for Rates A and C) while in others it didn't, or it rounded down (total for Rate B).
As far as I am aware, Xero calculates the sales tax for each rate. They round that tax rate to 2 decimal places. What I am not aware of is the rounding rules they are using.
Can anyone help me understand what is going on and why the calculation for Rate B in this scenario is incorrect?
none - did this via the UI