Skip to content
Advertisement

For VAT tax, what is the correct Decimal(p, s) precision and scale for SQL Server field size declaration?

I am defining VAT rates (European and other countries levy the VAT tax) in a SQL Server database and am wondering what the ideal decimal definition to capture the necessary precision.

I have seen VAT rates of:

20% (0.20) UK, Italy, Austria, etc.
21% (0.21) Belgium, Ireland, etc. 
19.6% (0.196) Monaco, France

I am curious if there are cases where the VAT rate requires more precision than decimal(4, 3) where p is precision and s is scale. I have read a number of documents and am not sure if the EU or others have a particular specification for the VAT in terms of positions after the “.” (or “,” in their case). What’s to stop the UK from saying their VAT is now 0.20111111 if they want to use some formula-based calculation for the VAT rate instead of a fixed-precision value?

Thanks in advance to you international men and women of mystery.

Advertisement

Answer

According to the PDF document referred at the end of this page, you should be safe with decimal(4,3). Although it seems that some historical cases would have required a precision of 4.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement