tax rounding

Just a quick … issue with tax rounding. I’ve put together a ‘bespoke’ commerce system, and have integrated taxjar with it. However… i’ve also had to import orders from bigcommerce, and the bigcommerce store is using avalara.

A charge of 13.28, with 7.25% tax rate, gives .9628, which, going through rounding, gives 96 cents. The info coming from the bigcommerce/avalara shows 97 cents, causing no end of stupid frustration.

Similar example at this link shows an example in Maryland, and avalara’s answer is something to do with Maryland “brackets”, but there’s not a good way to tell which states (or perhaps even which counties in various states do this. Using a ‘per line item’ call to any tax service will get expensive, and the rounding (round half up on a 5) has worked decently with taxjar over the past several months (the numbers we calculate match what they calculate). I’m reluctant to change much of anything, but for parity with the bc/avalara duo, I might have to. Changing round() calls to ceil() calls is probably enough (or… something like ceil(x*100)/100 perhaps) but… argh…. not really a problem I want to be dealing with.

Just felt like sharing…

Leave a Reply

Your email address will not be published. Required fields are marked *