pa***@community.nospam wrote:
So I guess to understand correctly, let us assume the following 3
variables:
FinalAmount: $10,000
Tax Amount: = 10,000*0.0035 = $35
But the tricky part the final amount always needs to be 10,000. So if
we back the amount down to (10000-35) = 9965, then that will now
change the tax amount.
No,
final amount=initial amount+tax amount (eqn 1)
where
tax amount=initial amount*tax rate (eqn 2)
substituting (eqn 2) into (eqn 1) gives
final amount=initial amount+(initial amount*tax rate)
which is
final amount=initial amount*(1+tax rate) (eqn 3)
divide both sides of (eqn 3) by (1+tax amount) and re-arrange to give
initial amount=final amount/(1+tax amount)
Putting in the figures final amount=10,000 and tax rate=0.0035:
initial amount=10,000/(1+0.0035)
initial amount=9965.12
HTH
Andrew