I want to calculate maximum affordable property value for given capital, taking stamp duty into account
Assume the only house-purchasing costs are the house price plus (UK) stamp duty.
For any given property the TotalCost is therefore the SalePrice plus the StampDuty.
Stamp duty is currently banded as follows:
| From | To | % |
|---|---|---|
| £0 | £124,999 | Zero |
| £125,000 | £249,999 | 2% |
| £250,000 | £924,999 | 3% |
| £925,000 | £1,499,999 | 5% |
| Remaining amount (above £1,500,000) | 2% |
To calculate the StampDuty (and therefore the TotalCost) we can perform a calculation which can be described using the following Excel formula (assuming the SalePrice is in A1):
=SUMPRODUCT(--(A1>{125000;250000;925000;1500000}), A1-{125000;250000;925000;1500000}, {0.02;0.03;0.05;0.02})
My question is this: How can I perform the inverse calculation?
In other words:
The cost equation consists of three terms and looks like this:
SalePrice + Tax = TotalCostI have shown, above, how to work out the
Tax(and therefore theTotalCost) from a givenSalePrice.But how do I do the inverse; work out the
Tax(and therefore theSalePrice) from a givenTotalCost?
Answer does not have to be in the form of an Excel formula.
You have given us the price limits and tax rates. They are:
$$ pricelimits=[124999,249999,924999,1499999]\\ taxrates=[0,0.02,0.03,0.05,0.02] $$
You first need to find the tax limits for the intervals. They are:
$$ taxlimits=[0,2500,22750,51500] $$
This means that for the values in the price limits, you pay the corresponding values in the tax limits.
Now you need to find the total cost limits, which are just price limits and tax limits added together. We have:
$$ totalcost=[ 124999, 252499, 947749, 1551499] $$
Then,
The vertical lines correspond to the breakpoints due to the changes in the tax rate.
Here is the Python code. It is very unoptimised, but you don't need much optimisation for this calculation. Just insert the tax for which you want to find the price at the last line, if you use python.