Foxy Forum Status

We're no longer responding to questions via our forum, but we will keep it up for historical reasons. If you can't find the answer you're looking for, please visit our knowledge base or contact us. If there's enough interest in the future, we may bring the forum back.

Question about sales tax and rounding

Can you explain the details of how sales tax is calculated, especially with regard to rounding? We're finding that frequently, our accounting system seems to round the opposite way from how Foxycart does it, and we end up with penny offages in our sales tax. It's not the end of the world, but it's kind of annoying, and if we know what rule Foxy is following it, we might be able to make our accounting system follow the same rule. Thanks!
  • brettbrett FoxyCart Team
    Hi @dustystrings. I thought last time we dug into this that we documented it publicly, but apparently we didn't :(

    Can you let me know what tax system you're using? For Avalara AvaTax and TaxJar, we use their returned totals (and communicate back refunds too, with some new functionality we have that's not quite public yet).
  • Hi @brett,

    We have two different taxes:

    Regional tax with one rate, not calculated automatically (state of CA - 7.25%)

    Regional tax, calculated automatically using FoxyCart Default (state of WA)

    Is that what you were asking for?
  • brettbrett FoxyCart Team
    Could you whisper transaction IDs (maybe one for CA and one for WA) that have the rounding issues you're describing?

    My earlier question was more about what you're using for taxes on your end. In other words, Foxy's rounding one way, but your accounting system is rounding another way. What system is that, and what settings for rounding does it have? Sometimes there are settings to round at the individual item level (ie. at quantity = 1), at the line item level (ie. round at the price * quantity value), or at the subtotal level (ie. the sum of all items * quantities; I believe this is what we do but we'll confirm and update our docs).

    I've never seen a state or country that specifies exactly how taxes _should_ be applied. Typically it's just "do what makes sense", but some systems allow configuration. (Foxy doesn't at this point, as most folks who are reconciling at that level of detail are using AvaTax, OneSource, or TaxJar, and adding that to Foxy would be a bit of complexity )
  • Oh, I see what you're asking. We calculate tax by first totaling merchandise plus shipping, which is always in whole cents, and multiplying the total by the tax rate. We round up for anything half a cent or higher, and round down for anything below .5 cents, but it doesn't look like that's how Foxy is doing it. For example, one WA transaction has a total of $16, and an 8.1% tax is applied, which comes to $1.296. Our system rounded up to $1.30, but Foxy charged $1.29. I'll whisper the transaction ID. I don't think I have an example of CA going wrong, since we've only been doing that one for a week, so it might be fine.
  • dustystringsdustystrings Member
    edited April 2019
    I might not have clearly answered your question. I meant to say that there isn't any rounding that happens in our system until we get to the tax calculation. Everything we sell has a price in whole cents, and quantities in integers. So we do the sum of all the lines (line item qty * price), plus shipping, and then multiply that subtotal by the tax rate.
  • fc_adamfc_adam FoxyCart Team

    Thanks for providing the examples and the additional details. From what you've described, it sounds like you've set up your own system to calculate the taxes, would that be correct to say?

    We'll review those transactions and follow-up with confirmation for you on our tax approach as soon as we can.
  • @fc_adam,

    Yes, we've set up our own system. However, we are in the process of switching to Quickbooks, and have confirmed that Quickbooks also calculates taxes differently from how Foxy does it. I'm guessing the difference is that Foxy is rounding earlier in the equation, and Quickbooks isn't rounding until the end. Referencing my last whisper, Quickbooks came up with $8.84 for the tax.

    Again, it's not a big deal! It just looks sort of funny to our customers when their receipt from us has a $.01 sales tax offage line on it in order to make it match what they paid through Foxy.
  • fc_adamfc_adam FoxyCart Team

    Thanks for the additional notes there.

    To confirm from our side, our rounding for tax calculations is happening as you suspected. We calculate taxes on shipping, taxable coupon discounts, and product subtotals (by category) separately, rounding to two decimal places for each calculation.

    We've added some notes on that to our wiki here for future reference too:

    Thanks for your patience while we confirmed that, and for providing your example transactions too. Let us know if we can help any further.
  • @fc_adam,

    I understand - thanks for looking into that. Since we won't be able to modify Quickbooks to work that way, I think we'll just have to deal with the offage.
Sign In or Register to comment.