Xero Rounding Issues

Why Rounding Discrepancies/Differences occur between Xero and fileAI

  • fileAI extracts the values exactly as they are, but the values exported to Xero may differ slightly
  • This happens because Xero applies rounding to the tax calculated for each individual line item rather than rounding the total tax amount for the entire invoice, which can result in minor differences in the overall tax totals and invoice totals.

 


How does Xero handle tax calculations and rounding?

Xero uses standard rounding rules to calculate and apply tax to transactions.

 

Here's a detailed breakdown of how Xero handles tax calculations and rounding:

1. Tax Calculation in Xero

  • Xero calculates tax based on the line items' amounts in an invoice, bill, or transaction

  • This tax amount is calculated for each line item, then added together to determine the total tax for the transaction

The formula for tax is: Tax Amount = Line Item Amount x Tax Rate

 

2. Rounding Rules in Xero

  • Xero uses banker's rounding (also known as "round half to even") to determine when to round up or down.
  • The key points are:
    • If the tax calculation result has more than 2 decimal places, Xero rounds it to two decimal places

    • If the third decimal place is:

      • Less than 5: Round down

      • 5 or more: Round up

For example:

  • 1.845 → 1.84 (rounds down because the last digit is 5 and even rounding applies)

  • 1.846 → 1.85 (rounds up because the last digit is 6)

 

3. General Illustration Example of how Xero Rounding works

  • Suppose you have a line item of 1.843 with a 9% tax rate,
    • Tax amount calculation would be 1.843×0.09=0.16587

    • Xero would round 0.16587 to 0.17, as the third decimal place (5) rounds up


 If your transaction involves multiple line items, Xero calculates the tax for each line item separately and sums them up, applying rounding to the final tax total

 

Practical example : Calculation for tax per line item

Image

Source file:

Image

 

Output in Xero:

Image