Functional Weave
Code in Rust

finance.tax.vat-flat-rate@1.0.1

README.md

4,732 bytes · view raw

# finance.tax.vat-flat-rate

Under the VAT Flat Rate Scheme a small business pays HMRC a fixed percentage of
its VAT-inclusive turnover instead of output tax less input tax. The percentage
depends on the trade sector and changes over time, so it is dated data here, and
the function takes the supply date.

**Which rate.** The sector's rate in force on the supply date (tax point), from
`data/flat-rates.json`. A limited cost business uses 16.5% whatever its sector,
from 1 April 2017 (VAT Notice 733, para 4.4); asking for it before that date is
an error, since the rate did not exist. Whether a business is a limited cost
business (relevant goods under 2% of turnover, or under GBP 1,000 a year, GBP
250 a quarter) is decided per return period by the caller and passed in; the
sector is still checked so that a typo is caught.

**First-year reduction.** In the first year of VAT registration 1 percentage
point comes off the flat rate "until the day before your first anniversary of
becoming VAT registered" (para 4.7), including off the limited cost rate (the
Notice's Example 1: 16.5% becomes 15.5%). Pass the registration date when the
business is entitled to it and null when it is not (registering late, or more
than a year before joining the scheme, loses it). A supply date before the
registration date is an error. The reduction cannot take a rate below 0%: the
0% hotel rate of 2020-21 stays 0%.

**Rate changes inside a period.** Notice 733 para 4.12 requires two
calculations when a rate changes during a VAT period; call this once for each
part of the turnover. The same goes for a period that straddles the end of the
first year.

**Rounding.** The VAT due is the turnover times the rate, rounded half-up to
the penny once. Notice 733 does not state a rounding rule; this should be
confirmed by a VAT adviser. Negative turnover (credit notes) gives negative VAT.

## Data and sources

- Sector rates: HMRC, "VAT Flat Rate Scheme: how much you pay",
  https://www.gov.uk/vat-flat-rate-scheme/how-much-you-pay, read on 23 September
  2026, including the temporary hospitality rates: catering 4.5% and hotels 0%
  and pubs 1% from 15 July 2020 to 30 September 2021, then 8.5%, 5.5% and 4% to
  31 March 2022.
- The current table dates from 4 January 2011, when it was substituted by SI
  2010/2940 with the rise of VAT to 20% (VAT Regulations 1995, reg 55K,
  https://www.legislation.gov.uk/uksi/1995/2518/regulation/55K). Earlier rates
  are not included, so a supply date before 4 January 2011 is refused.
- Limited cost business rate and first-year reduction: VAT Notice 733, "Flat
  Rate Scheme for small businesses", paras 4.4, 4.7 and 4.12,
  https://www.gov.uk/guidance/flat-rate-scheme-for-small-businesses-vat-notice-733--2
- Reg 55K on legislation.gov.uk also lists "Dealing in waste or scrap" at
  10.5%, which gov.uk's table does not; it is left out until confirmed.

Sector keys are HMRC's sector names in lower case with punctuation turned into
hyphens ("Retailing food, confectionery, tobacco, newspapers or children's
clothing" is `retailing-food-confectionery-tobacco-newspapers-or-childrens-clothing`).
When a rate changes, publish a new version with a new row. The data declares its
effective dates, so a `history=current` build refuses older supply dates with an
explanation instead of answering them at today's rate.

## Before you rely on this

**Not professional advice.** This capability calculates tax figures from published rules. It is a software component for developers, not tax 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 chartered accountant or tax adviser 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 chartered accountant or tax adviser 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/).

Legislation: Crown copyright and database right.

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