Functional Weave
Code in TypeScript

invest.isa-allowance@1.0.2

README.md

5,246 bytes · view raw

# invest.isa-allowance

How much of each ISA subscription limit has been used in a UK tax year and how
much is left: the overall adult limit, the Lifetime ISA limit inside it, the
cash ISA limit inside it (from 2027/28, for savers under 65), and the Junior
ISA limit, which is the child's own allowance.

## Why it is shaped this way

- **Limits inside limits.** A Lifetime ISA's £4,000, and from 2027/28 an
  under-65's £12,000 of cash, count towards the £20,000. So what is left of
  them is also capped by what is left overall: £18,000 in a stocks and shares
  ISA leaves £2,000 of Lifetime ISA room, not £4,000.
- **Junior ISA is separate.** It is the child's allowance, counted on its own
  and never against the adult's. Pass one child's subscriptions (or leave
  them out).
- **`exceeded`, not an error.** An over-subscription is a fact to report
  (HMRC repairs or voids the excess), so the function answers with the flags
  set rather than throwing.
- **Each tax year is its own row** in `data/isa-limits.json`, so the label and
  the 6 April to 5 April bounds come from the data and a year the data does
  not cover (before 2017/18, after 2027/28) is refused rather than guessed.

## The 2027/28 cash limit

From 6 April 2027 the government has announced a cash ISA limit of £12,000
for savers under 65, inside an unchanged £20,000, with savers 65 or over able
to put the full £20,000 in cash "from the start of the tax year in which an
individual turns 65". Here that means: a saver whose 65th birthday falls on
or before 5 April at the end of the tax year has no separate cash limit
(`cash` is null); anyone younger has the £12,000 limit, and `dateOfBirth` is
then required. A 29 February birthday is compared as the string
"YYYY-02-29", which sorts correctly.

At 2026-09-23 this is announced policy (policy paper published
17 September 2026) with the amending ISA Regulations still in draft. The row
is marked so in its note; if the final regulations differ, publish a new
version with the corrected row.

## Limits

| Tax years | Overall | Lifetime ISA | Junior ISA | Cash, under 65 |
|---|---|---|---|---|
| 2017/18 | £20,000 | £4,000 | £4,128 | none |
| 2018/19 | £20,000 | £4,000 | £4,260 | none |
| 2019/20 | £20,000 | £4,000 | £4,368 | none |
| 2020/21 to 2026/27 | £20,000 | £4,000 | £9,000 | none |
| 2027/28 | £20,000 | £4,000 | £9,000 | £12,000 |

## Out of scope

Lifetime ISA age rules (open under 40, pay in until 50) and the government
bonus; whether a cash Lifetime ISA counts towards the cash limit (it is not
counted as cash here); transfers between ISAs, which are not subscriptions;
flexible ISA withdrawals and replacements; the 2027 anti-circumvention rules.

## Sources

Read on 2026-09-23:

- GOV.UK, "Individual Savings Accounts (ISAs): How ISAs work" (£20,000 a year;
  Lifetime ISA £4,000 a year, inside it):
  https://www.gov.uk/individual-savings-accounts/how-isas-work
- GOV.UK, "Junior Individual Savings Accounts (ISA)" (£9,000 in 2026/27):
  https://www.gov.uk/junior-individual-savings-accounts
- HMRC, "Annual savings statistics: background and methodology" (Tables of
  adult and Junior ISA subscription limits by tax year, 2008/09 to 2026/27):
  https://www.gov.uk/government/statistics/annual-savings-statistics-2026/annual-savings-statistics-background-and-methodology
- HMRC policy paper, "Cash Individual Savings Account (ISA) limit reduction",
  published 17 September 2026:
  https://www.gov.uk/government/publications/reduction-in-the-cash-individual-savings-account-isa-limit/cash-individual-savings-account-isa-limit-reduction
- "ISA reform 2027: anti-circumvention rules factsheet" (the age 65 test):
  https://www.gov.uk/government/publications/fiscal-events-2026-factsheets/isa-reform-2027-anti-circumvention-rules-factsheet

1.0.1 fixes Python accepting a trailing newline or non-ASCII digits in taxYearDate, dateOfBirth and subscription dates; adds tests.

## Before you rely on this

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

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