Article Contents
- Introduction
- What Hiro Rounds (and Why)
- Why Doesn’t GST Equal 10% of the Subtotal?
- Practical Example
- Summary
Introduction
Hiro calculates invoice line items and totals in a way that aligns with how Xero handles tax and rounding. Sometimes, these figures can differ slightly from what you might see in other systems or when doing manual calculations.
There are many valid ways to handle rounding. Hiro follows a consistent method that matches Xero’s approach, ensuring totals stay in sync between the platforms.
This article explains:
- What Hiro rounds, and when
- How GST totals are calculated
- Why just adding 10% to the subtotal won’t always give the correct total
- How Hiro ensures synced invoices match what's in Xero
What Hiro Rounds (and Why)
Hiro always calculates and stores invoice values to two decimal places, matching Xero’s expectations. All rounding happens at the line level, which ensures the final totals align with how Xero calculates and displays tax.
| Field | How Hiro handles it |
|---|---|
| Line item tax | Calculated per line, then rounded to two decimal places |
| Line item total (incl.) | Calculated per line, then rounded to two decimal places |
| Invoice subtotal (excl. tax) | Sum of all line item amounts before tax, using the rounded values |
| Invoice total tax | Sum of all line item tax amounts, using the rounded values |
| Invoice total (incl. tax) | Sum of all line item totals, using the rounded values |
This approach ensures consistency with Xero’s API rules and display behaviour, preventing mismatches between the two systems — even when GST doesn’t look like exactly 10% of the subtotal.
Why GST Can’t Just Be 10% of the Subtotal
If your invoice uses a flat 10% GST rate, it might seem intuitive to expect:
Subtotal × 10% = GST
Subtotal + GST = Invoice total
But that isn’t how Xero calculates tax — and Hiro matches Xero’s approach exactly.
Both platforms calculate GST per line item, rounding each line’s tax to two decimal places (nearest cent) before summing.
- Rounding accuracy: Small discrepancies can arise when tax is calculated line by line vs applied to the overall subtotal.
- Tax correctness: Not all items may attract GST. For example, disbursements, exports, or exempt services may be GST-free. Applying 10% to the subtotal would incorrectly assume everything is taxable.
By following Xero’s per-line tax logic, Hiro ensures invoice totals are accurate, tax treatment is correct, and your totals match exactly — even if they don’t look like a simple 10% calculation.
Practical Example
Say your invoice includes the following three items, each with 10% GST:
| Description | Ex GST | GST (10%) | Inc GST |
|---|---|---|---|
| Site setup | $512.35 | $51.24 | $563.59 |
| Vegetation assessment | $654.33 | $65.43 | $719.76 |
| Final report | $372.66 | $37.27 | $409.93 |
| Total | $1,539.34 | $153.94 | $1,693.28 |
Now let’s compare two ways to calculate the total:
Option A: Add GST per line (what Hiro and Xero do)
-
GST is calculated on each line, rounded to two decimals:
- $512.35 × 10% = $51.235 → $51.24
- $654.33 × 10% = $65.433 → $65.43
- $372.66 × 10% = $37.266 → $37.27
- Sum of GST = $51.24 + $65.43 + $37.27 = $153.94
- Total incl GST = $1,539.34 + $153.94 = $1,693.28
Option B: Apply 10% to the subtotal
- $1,539.34 × 10% = $153.934, which rounds down to $153.93
- Total incl GST = $1,539.34 + $153.93 = $1,693.27
So while the subtotal is identical, the total amount including GST is one cent higher when each line's GST is rounded individually — which is what both Hiro and Xero do.
Summary
| ✅ Hiro Does This | ❌ Hiro Doesn’t Do This |
|---|---|
| Calculates GST per line item | Apply GST to the subtotal |
| Matches Xero’s totals exactly | Add a rounding adjustment line |
| Rounds all line item amounts to 2 decimal places | Use 4 decimal places anywhere |