Functional Weave
Code in Python

property.stamp-duty@1.0.2

README.md

9,381 bytes · view raw

# property.stamp-duty

Status: needs review by a conveyancing/tax professional before it is published.

The tax on buying land or property in the UK, which is three different taxes:

| region | tax | administered by |
|---|---|---|
| `england-ni` | Stamp Duty Land Tax (SDLT) | HMRC |
| `scotland` | Land and Buildings Transaction Tax (LBTT) | Revenue Scotland |
| `wales` | Land Transaction Tax (LTT) | Welsh Revenue Authority |

All three are "slice" taxes: the price is cut into bands and each band is
taxed at its own rate. `stampDuty` takes one purchase and returns the bands
it reaches, the tax on each, the total, and which schedule of rates applied.

## What it covers

- **Residential and non-residential** (non-residential includes mixed use)
  purchase prices, for every region.
- **First-time buyers.** England: relief rates up to a price limit; above
  the limit the relief is lost entirely and the standard rates apply to the
  whole price (£500,000 → £10,000; £500,000.01 → £15,000). Scotland: the nil
  band rises to £175,000, with no price limit. Wales has no first-time buyer
  relief, so the main rates apply. From 8 July 2020 to 30 June 2021 England's
  first-time buyer rates were replaced by the reduced standard rates, so the
  standard schedule applies then.
- **Additional dwellings** (`additionalProperty`): England's higher rates
  add 3 points to every band (5 points from 31 October 2024); Scotland's
  Additional Dwelling Supplement is a separate charge on the whole price
  (4%, then 6% from 16 December 2022, 8% from 5 December 2024); Wales's
  higher residential rates are a separate table with their own bands. None
  applies below £40,000.
- **Non-resident surcharge** (`nonResident`): England and Northern Ireland
  only, 2 points on every residential band from 1 April 2021, on top of any
  other rates including the nil band and first-time buyer rates. It does not
  apply to non-residential purchases, and Scotland and Wales have none, so
  the flag changes nothing there.

The caller says whether the higher rates apply. Whether a purchase attracts
them (replacing a main residence, spouses, inherited shares, the 36-month
refund window) is a legal judgement, not arithmetic.

## Rounding

Each tax is rounded down to the whole pound, once, from the exact sum of the
bands (HMRC SDLT Manual SDLTM00050: "The amount calculated is round down to
the nearest pound"; Revenue Scotland and the Welsh Revenue Authority return
guidance: tax entered rounded down to the nearest pound). In Scotland LBTT
and ADS are separate lines on the return, each rounded down on its own, so
they are here too: `bandTax` and `supplement`, with `total` their sum. The
per-band `tax` in `slices` is rounded down to the penny and is for display;
it is not what the total is built from.

## Rules as dated data

Every band, relief schedule and surcharge is a dated row in
`data/bands.json` and `data/surcharges.json`, taken from the date the
rates changed, and the lookup uses `effectiveDate` (normally completion).
The data covers every date from 1 April 2021 onwards in every region (and
back to 8 July 2020 in England, 27 July 2020 in Wales, 2016 and 2018 for
non-residential):

- England residential: 8 July 2020 (nil band £500,000), 1 July 2021
  (£250,000), 1 October 2021 (£125,000 and a 2% band), 23 September 2022
  (£250,000; first-time buyers £425,000 up to £625,000), 1 April 2025
  (back to £125,000; first-time buyers £300,000 up to £500,000).
- Scotland residential from 1 April 2021 (unchanged through 2026-27).
- Wales main rates: 27 July 2020, 1 July 2021, 10 October 2022; higher rates
  1 April 2018, 22 December 2020, 11 December 2024.

A date outside the data is an error, not a guess. A project installed with
`history=current` keeps only the rules still in force and refuses an older
date with an explanation rather than answering it with today's rates.

## What it does not do

- **Transitional contract rules.** Where a contract exchanged before a
  change completes after it (England's 3% higher rates for contracts before
  31 October 2024; Scotland's 6% ADS for contracts on or before 4 December
  2024; Wales's October 2022 and December 2024 rules), the old rates may
  apply. Pass the date whose rates apply as `effectiveDate`.
- Leases (SDLT/LBTT/LTT on the net present value of rent), linked
  transactions, companies (England's 17% rate for non-natural persons over
  £500,000), multiple dwellings relief (abolished in England from 1 June
  2024), mixed-use apportionment, and other reliefs and exemptions.
- ADS on joint purchases or partial interests, and ADS or higher rates
  repayment claims.

## Sources

England and Northern Ireland (SDLT), fetched September 2026:

- GOV.UK, "Stamp Duty Land Tax: Residential property rates" (current rates,
  first-time buyers, 5% additional property surcharge, 2% non-resident
  surcharge): https://www.gov.uk/stamp-duty-land-tax/residential-property-rates
- GOV.UK, "Stamp Duty Land Tax rates from 1 December 2003 to 31 March 2025",
  and the period pages linked from it (8 July 2020 to 30 June 2021; 1 July
  2021 to 30 September 2021; 1 October 2021 to 22 September 2022;
  23 September 2022 to 30 October 2024; 31 October 2024 to 31 March 2025;
  4 December 2014 to 7 July 2020 for the non-residential rates from
  17 March 2016 and the 3% higher rates from 1 April 2016):
  https://www.gov.uk/government/publications/rates-and-allowances-stamp-duty-land-tax
- GOV.UK, "Higher rates of Stamp Duty Land Tax" (not below £40,000):
  https://www.gov.uk/guidance/stamp-duty-land-tax-buying-an-additional-residential-property
- GOV.UK, "Rates of Stamp Duty Land Tax for non-UK residents" (£40,000;
  applies on top of the zero and first-time buyer rates; the £700,000
  worked example, £39,000):
  https://www.gov.uk/guidance/rates-of-stamp-duty-land-tax-for-non-uk-residents
- HMRC Stamp Duty Land Tax Manual SDLTM00050 (rounding):
  https://www.gov.uk/hmrc-internal-manuals/stamp-duty-land-tax-manual/sdltm00050

Scotland (LBTT):

- Revenue Scotland, "Residential property" (rates from 1 April 2021,
  first-time buyer nil band £175,000):
  https://revenue.scot/taxes/land-buildings-transaction-tax/residential-property
- Revenue Scotland, "Non-residential property" (rates from 25 January 2019):
  https://revenue.scot/taxes/land-buildings-transaction-tax/non-residential-property
- Revenue Scotland, "The Additional Dwelling Supplement (ADS)" (4% from
  25 January 2019, 6% from 16 December 2022, 8% from 5 December 2024; on the
  total price; not below £40,000):
  https://revenue.scot/taxes/land-buildings-transaction-tax/additional-dwelling-supplement-ads
- Revenue Scotland, "About the calculation" (LBTT and ADS each rounded down
  to the nearest pound):
  https://revenue.scot/land-buildings-transaction-tax/guidance/how-to/paper-lbtt-return/about-calculation
- Scottish Government, "Scottish Budget 2026 to 2027: Scottish tax ready
  reckoners" (LBTT rates and bands, including ADS, unchanged for 2026-27):
  https://www.gov.scot/publications/scottish-budget-2026-2027-scottish-tax-ready-reckoners/pages/4/

Wales (LTT):

- Welsh Government, "Land Transaction Tax rates and bands" (main residential
  rates from 27 July 2020, 1 July 2021 and 10 October 2022; higher
  residential rates from 1 April 2018, 22 December 2020 and 11 December
  2024; non-residential rates from 1 April 2018 and 22 December 2020):
  https://www.gov.wales/land-transaction-tax-rates-and-bands
- Welsh Government, "Higher rates of Land Transaction Tax: overview" (a
  residential property worth £40,000 or more):
  https://www.gov.wales/higher-rates-land-transaction-tax-overview
- Welsh Government, "Land Transaction Tax return guidance: about the
  calculation" (amounts rounded down to the nearest pound):
  https://www.gov.wales/land-transaction-tax-return-guidance-about-calculation-all-transactions-html

1.0.1 fixes Python accepting a trailing newline or non-ASCII digits in effectiveDate; adds tests.

## Before you rely on this

**Not professional advice.** This capability calculates property figures from published rules. It is a software component for developers, not legal or financial advice. Rules change and every rate here has an effective date. Check that the dates cover your case. Verify results against the official sources listed above, and have a conveyancer or tax adviser (SDLT, LBTT, LTT) review how you use it, before anyone relies on the output. Provided "as is" under its licence, without warranty.

**Unreviewed.** This capability's implementations agree in every language and pass its published test vectors, which were worked out from the official sources cited. But no qualified conveyancer or tax adviser (SDLT, LBTT, LTT) has yet checked those vectors, or confirmed that the capability covers the cases it claims. Treat it as a draft. Do not use it for real people, money or decisions without your own expert review. Once a qualified reviewer signs off, this notice is replaced with their name, qualification and the date. Each new version needs fresh sign-off.

## Notices

Contains public sector information licensed under the Open Government
Licence v3.0 (https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/).

1.0.2 marks it unreviewed and adds its attribution notices (NOTICE). The code and the tests are unchanged.