I need to calculate the actual tax value when only the gross value and tax percentage is known.
The basic formula to calculate the gross amount:
$Gross = Net * (1+Vat)$
$Tax = Net * Vat$
Example:
Net = 152.75 USD
Vat = 0.07
Gross = 152.75 * (1+0.07) = 163.44 USD
Tax = 152.75 * 0.07 = 10.69 USD
Proof:
Gross - Tax = Net
163.44 USD - 10.69 USD = 152.75 USD
However, in my case I only have $Gross$ and $Vat$ and need to get the $Tax$ value in a single multiplication.
The current approach is the following:
$Tax = Gross - \frac{Gross}{(1 + Vat)}$
Example:
Tax = 163.44 USD - (163.44 USD / 1.07) = 10.69 USD
Question:
How can I get the $Tax$ value with a simple multiplication, without the need of a subtraction.
Using @Matti P. derived formular, one can assume that his function $f(x)=\frac{Vat*x}{1+Vat}$ is linear for a constant value of $Vat$. Hence, plotting the function with $Vat=0.07$ leads to:
The plot shows the y-intersect at $0$. Hence, one can simply use a first-order polynomial $y=mx+b$, where $m$ is unknown, $x$ is $Gross$ and $b=0$ and solve it for $m$ with any previously calculated value of $y=10.69$ and associated $x=163.44$. This leads to $m=\frac{10.69}{163.44}$.
To have a single coefficient to calculate the Tax value from using a single multiplication, one can simply use $f^*(x)=0.0654063*x$ for $Vat=0.07$.
$Tax = f^*(163.44)=0.0654063*163.44 = 10.690005672$