I'm not sure how to best describe this in the title, so I will do my best here:
Let's say we have an order that prices out to $48,967.00 - but we have a few categories that make this up: taxes, delivery, products, labor, and installation. To make it simpler, those are bundled together into two variables: a total taxable and a total non taxable.
So in this example, the total with tax is 48,967.00 The taxable total is 40,130.00 The tax itself is 2,809.10 (7% tax rate as example) The non-taxable total is 6,027.90
The contract however is for 50,000.00 even.
What I want to be able to do, is adjust the taxable total to a new value that allows for the price to be $50,000.
In this case, I obviously need to increase the taxable total until it and it's taxes add up with the non-taxables to $50,000.00
The problem is that I don't seem to be capable of figuring out a way to do this that doesn't involve recursively trying values one at a time until I find the right taxable total that will add up with it's non-taxable lines, plus the new increased tax, to $50,000.
Obviously if I'm increasing the taxable total to reach 50,000 then taxes go up as well. My problem seems to be that I can't predict or figure out a formula that accounts for the fact that the taxes go up as I increase the taxable total too. This is important because the total of 50,000 includes taxes. So a simple variance between the contract price and the original is not working.
If this is a question that has been asked before, please direct me to the applicable answer. I searched for a while and was not able to find something similar to this particular problem.
Keeping the non-taxable total the same, the taxable total including tax is
$$\$50\,000 - \$6\,027.9 = \$43\,972.1.$$
Then with the same $7\%$ tax rate, the pre-tax amount for the taxable part is
$$\frac{\$43\,972.1}{1+7\%} \approx \$41\,095.42.$$