TransWikia.com

How to handle/calculate/store prices with or without VAT in software

Personal Finance & Money Asked by Florent Poujol on March 23, 2021

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.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP