This question was **closed** Mar 21 at 11:02 PM by zgreathouse for the following reason: The question is answered, right answer was accepted

@Jacob Abrams

Issue: Clover's tax calculation has an issue in rounding it to nearest value, it behaves differently in our below cases:

Issue: Clover's tax calculation has an issue in rounding it to nearest value, it behaves differently in our below cases:

- In Row 2 we calculated tax with 4 digit accuracy $33.6158, logically it should round to $33.62, but clover calculate it to $33.61 (its not correct)
- In Row 13 we calculated tax with 4 digit accuracy $21.7192, logically it should round to $21.72, but clover calculate it to $22.72 here clover work fine
- In Row 7 we calculated tax with 4 digit accuracy $14.1049, logically it should round to $14.11, but clover calculate it to $14.11 here clover work ok
- In Row 5 we calculated tax with 4 digit accuracy $11.7147, logically it should round to $11.72, but clover calculate it to $11.71 (its not correct)

Comment

Example of issue.

Best Answer

**Answer** by Jacob Abrams
·
Mar 15 at 09:07 PM

Can you provide complete examples with all applicable tax rates? In your spreadsheet you mention 17% tax. However it matters if that 17% is actually composed of more than one tax rate, for example 9% city tax and 6.75% county tax and 1.25% health tax. Each tax is computed independently because each tax authority is paid independently, but on the receipt we show the customer one total tax.

See this example: https://docs.google.com/spreadsheets/d/e/2PACX-1vTHSSrk2ekVu107RgKLLoz2Nc6n7C8UBxXf82wJDKi-qMxkl97NbOxdY41movntZW69QllSUi8erlQq/pubhtml

See this example: https://docs.google.com/spreadsheets/d/e/2PACX-1vTHSSrk2ekVu107RgKLLoz2Nc6n7C8UBxXf82wJDKi-qMxkl97NbOxdY41movntZW69QllSUi8erlQq/pubhtml

In our demos we posted, we just set one tax rate so we only have 1 calculation. You can see from our examples that the rounding seems to be inconsistent, like our first example:

- In Row 2 we calculated tax with 4 digit accuracy $33.6158, logically it should round to $33.62, but clover calculate it to $33.61 (its not correct)

With only 1 tax, provided from the sandbox environment, why is it some calculate correctly and some don't. We have clients asking about this so if someone could reachout, that would be great. @Jacob Abrams

Hi @Jacob Abrams,@Jeffrey Blattman,@zgreathouse

We are using the calc jar mentioned here (calc-270.9.jar) to calculate the tax on our API,

We're also facing rounding off issues when comparing TAX values calculated from the calc jar and clover orders placed from the device.

Tax Percentage: 7%

**Order Subtotal: **$32.25(6.45x5)

**Tax from Calc: **$2.25

**Tax from Clover Device**: $2.26

Sample usage of the calc jar can be found in this gist. Can you please point out if there are any issues on how the calc jar was used.

Hi @Jacob Abrams,@Jeffrey Blattman,@zgreathouse

Any update on this?

Clover Developer Community

Follow
### Follow this Question

Copyright © 2010-16 DZone, Inc. - All rights reserved.

- Anonymous
- Sign in
- Create
- Ask a question
- Post an idea
- Create an article
- Spaces
- App Market Developer Platform
- Clover GO
- Ideas & Feedback
- Semi-Integration
- Explore
- Topics
- Questions
- Ideas
- Articles