0

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

  • 1
    Is this programming related? Might be better as a question to Xero's customer support. – rustyskates Jul 11 '19 at 20:35
  • I already posted the question there. I was hoping to get a better understanding of how they are calculating the tax and the methods used. When looking through Xero's API documentation they give information stating that they calculate the tax for each line and then round to two decimals. In this situation, they are rounding to 2 decimals however they are rounding up for 2 of the rates and down for the other. Their API documentation doesn't say anything about the rules for rounding. When looking for support for the API it points me to use stack-overflow for posting questions. – AustinSBT Jul 11 '19 at 21:21
  • Since Xero over-rides inclusive tax calculations when posting invoices I am trying to get an understanding of how they calculate them in order to ensure we don't show one amount for inclusive tax in my program while the accounting system shows another. – AustinSBT Jul 11 '19 at 21:24

0 Answers0