Calculate maximum affordable property value for given capital, taking stamp duty into account

141 Views Asked by At

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 = TotalCost

I have shown, above, how to work out the Tax (and therefore the TotalCost) from a given SalePrice.

But how do I do the inverse; work out the Tax (and therefore the SalePrice) from a given TotalCost?

Answer does not have to be in the form of an Excel formula.

1

There are 1 best solutions below

4
On

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,

  1. Find the first number in the total costs that your cost is less than. If you paid £400000, that number is £252499.
  2. Find the surplus cost, i.e., the difference between the value you got in step 1 and the total cost you paid. Again, for £400000, that is £147501.
  3. The tax on the sale is the sum of the tax limit value corresponding to the total cost that you found in step 1 and surplus price divided by (1 + the corresponding tax rate) and multiplied by the tax rate. For £400000, you get £2500+£147501*.03/1.03=£6796.1
  4. Now that you have the tax, just take the difference between the total cost and the tax. If you paid £400000 for a house, the sale price is £393203.9 and £6796.1 is the tax.

enter image description here

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.

limits=np.asarray([125000,250000,925000,1500000])-1

tax_rate=np.asarray([0,.02,.03,.05])

def limit_finder():
    limit_stamp=[]
    for i in range(len(limits)):
        if i==0:
            limit_stamp.append(0)
        else:
            limit_stamp.append((limits[i]-limits[i-1])*tax_rate[i])
    return np.cumsum(limit_stamp)

def tax_finder(price):
    limit_stamp=limit_finder()
    true_limits=limit_stamp+limits
    if price>true_limits[-1]:
        price_f_surplus=price-true_limits[-1]
        return limit_stamp[-1]+price_f_surplus*.02/1.02
    for i in range(len(true_limits)):
        if price<true_limits[i] or price==true_limits[i]:
            price_surplus=price-true_limits[i-1]
            return limit_stamp[i-1]+price_surplus*tax_rate[i]/(1+tax_rate[i])

print(tax_finder(1550000))