A5.13 : Tax Rounding Algorithm (Adaptive Rounding Algorithm)

A5.13 : Tax Rounding Algorithm (Adaptive Rounding Algorithm)

There is a special algorithm on how we handle tax rounding algorithm in our system.


Example: 


Line
Qty
Unit Price
Tax
Tax (Before Round)
Tax (After Round)
1
1
13.11
6%
0.7866
0.79
2
1
13.11
6%
0.7866
0.79
3
1
13.11
6%
0.7866
0.79
4
1
0.00
6%
0.0000
0.00
Total

39.33


2.37


If you calculate the tax line by line and perform rounding to 2 decimals, the total tax of the above transaction will be 2.37. However, if you use 39.33 x 6% = 2.3598, after rounding will be 2.36 which has a 1 cent difference compared to 2.37.


In order to solve such issues, the easiest way is to apply this 1 cent to the last row of the transaction, then it will become below example:


Line
Qty
Unit Price
Tax
Tax (Before Round)
Tax (After Round)
1
1
13.11
6%
0.7866
0.79
2
1
13.11
6%
0.7866
0.79
3
1
13.11
6%
0.7866
0.79
4
1
0.00
6%
0.0000
-0.01
Total

39.33


2.36


However, this will cause some confusions as the last line has no Unit Price but why is there tax amount? Therefore, we had derived this into a rounding algorithm called Adaptive Rounding Algorithm. This algorithm works from top to bottom.


Line
Qty
Unit Price
Tax
Tax (Before Round)
Previous Before Round Total
Previous After Round Total
Tax (After Round)
1
1
13.11
6%
0.7866
0.7866
0.79
0.79
2
1
13.11
6%
0.7866
1.5732
1.57
0.78
3
1
13.11
6%
0.7866
2.3598
2.36
0.79
4
1
0.00
6%
0.0000
2.3598
2.36
0.00
Total

39.33




2.36


This algorithm applies the formula:

Round (Sum of Tax Before Round from Line 1 to Line N) - Sum (Tax from Line 1 to Line N-1)


The tax of Line 1 is

= Round (0.7866)

= 0.79


The tax of Line 2 is 

= Round (0.7866 + 0.7866) - (Line 1 Tax)

= Round (1.5732) - 0.79

= 1.57 - 0.79

= 0.78


The tax of Line 3 is 

= Round (0.7866 + 0.7866 + 0.7866) - (Line 1 Tax + Line 2 Tax)

= Round (2.3598) - (0.79 + 0.78)

= 2.36 - 1.57

= 0.79


The tax of Line 4 is

= Round (0.7866 + 0.7866 + 0.7866 + 0.0000) - (Line 1 Tax + Line 2 Tax + Line 3 Tax)

= Round (2.3598) - (0.79 + 0.78 + 0.79)

= 2.36 - 2.36

= 0.00


By using this method, Line 4 will not have any tax amount because the Unit Price is 0.00. However, it may make the intermediate lines has tax values such as Line 2 having 1 cent different with other lines that have similar Unit Price.


But because in the end, people mostly check their tax amount of the transactions as a whole instead of individual item, so we have applied this algorithm in our calculation. In other words, as long as the total tax is correct, then you will not have to worry much about the individual tax amount at each line.


--Source from AutoCount Wiki --

    • Related Articles

    • A5.96 : Tax - Reports : Tax Payment Collection

      This function allows you to inquiry on Tax Payment Collection. Tax Payment Collection is used to show and check which of your service tax transactions had already collected payment. Only payment basis tax codes will be considered in this function. To ...
    • A5.95 : Tax - Reports : Tax Transaction Listing

      This function allows you to generate Tax Transaction Listing. Tax Transaction Listing is used to list out all the details in transaction that applies tax code. It is an important report for you to know the tax amount involved by each tax code. To ...
    • A5.97 : Tax - Reports : Outstanding Service Tax Listing

      This function allows you to inquiry on outstanding service tax. It is used to check against your service tax transactions on how much tax had been collected and how much is still outstanding. Only payment basis tax codes will be considered in this ...
    • A5.36 : Error saving Invoice - Rounding Adjustment Account is empty

      Question: Why can’t I save Invoice, there is an error prompted “Rounding Adjustment Account is empty”? Possible Reason: You have enabled 5 cents rounding for Invoice, but 5 Cents Rounding Adjustment Account is not defined. Solution: 1) Go to Account ...
    • A5.98 : Tax - Functions : SST Processor

      This function allows you to process your company SST. It will process your SST transactions based on taxable period, generate a summary of your company SST so that you can submit your SST to custom. To access SST Processor, click on the Tax Menu > ...