My company handles prices and payments through our software where we typically store price without VAT in whole unit with 2 decimal places and VAT with 1 decimal place.

Generally speaking my question is : should we handle/store/manipulate prices with or without VAT, knowing that in practice the price with VAT is often the "base" one and the price without VAT is a consequence of the price with VAT that we choose/want and VAT imposed by regulations even if I know this is supposed to be the other way around.

1/ When we are calculating one of the price from the other and the VAT, should we just always round down, or up, or "naturally" (up when >= 0.5, down when < 0.5), or half-even ?

2/ When we are adding several quantities of the same price, should we work with the value with or without VAT, the rounded value or the exact one ?

Example : we sell a merchandise and we want it to cost 4.99 at 20.0% VAT. Unit price without VAT is 4.1583, or stored and displayed at 4.16.
But what if someone buy 100 of them, should we do 4.16 * 100 * 1.2 = 499.20 or 4.99 * 100 = 499.00 or 4.1583 * 100 * 1.2 = 499.00 (498.996) ?

Should we convert to with VAT as early as possible and multiply that, or only convert to VAT at the last moment

One solution seems to store prices without VAT with 4 digits of precision, but I find it really weird, because even Stripe don't do that.
And it doesn't prevent some issues because we would still need to round them somehow for display and thus any calculation using that rounded value would be incorrect.
Or is it acceptable to tell customer that we use a value for calculation more precise than the one displayed ?

Another solution seems to actually store the price with VAT, since this is the one we decide, no matter what VAT applies. But this seems uncommon since VAT is supposed to be able to change without affecting the price without VAT...

Thanks for your time and hopefully your answer.
If you have literature on how to handle these things, fell free to just link it.
I searched similar things on StackOverflow, and here but the subject is kind of generic, and hard to search for.

  • This seems like the kind of thing you should be asking your in-house subject-matter experts...
    – AakashM
    Oct 21, 2020 at 8:33
  • I would guess there's some regulation about this, not how to store the price but how much the customer should be charged compared to the price tag when rounding. Don't you shop in your area? Do you ever pay a bit more or less than the displayed price?
    – Kat
    Oct 22, 2020 at 17:35
  • Hey ! thanks you both for answering. I am asking this kind of things here because we don't have in-house -subject matter expert unfortunately, and even our CEO isn't sure how we should handle this properly. Do I ever pay a bit more or less than the displayed price? I do hope not, what the hell !? Or maybe do I really don't shop enough, I don't know.... I'm still looking into all that, thanks. Oct 28, 2020 at 19:24


You must log in to answer this question.

Browse other questions tagged .