Functional Weave
Code in Python

property.council-tax-band Unreviewed

Council tax for a valuation band from the Band D charge: the statutory band ratio, England, Wales and Scotland.

1.0.2 · published 2026-10-03 by charlie · Anterra

Pinned by 24 tests, run in TypeScript, Python and Rust.

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 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.

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 in its README, and have a conveyancer or tax adviser review how you use it, before anyone relies on the output. Provided “as is” under its licence, without warranty.

What it does

Every council tax band is charged as a fixed proportion of Band D, set in statute. The authority publishes its Band D figure each year; this turns it into the charge for any band:

charge = Band D × band proportion ÷ Band D proportion

For example

  • council_tax_band(£2,000.00, A, england, 2026-04-01) → band A, ratio numerator 6, ratio denominator 9, charge £1,333.33 England band A: six ninths of £2,000 is £1,333.33
  • council_tax_band(£2,000.00, B, england, 2026-04-01) → band B, ratio numerator 7, ratio denominator 9, charge £1,555.56 England band B: £1,555.56 (1555.555... rounds up)
  • council_tax_band(£2,000.00, D, england, 2026-04-01) → band D, ratio numerator 9, ratio denominator 9, charge £2,000.00 England band D is the Band D charge itself

The function

The same function in TypeScript, Python and Rust, pinned by the same tests. Pick your language; the choice follows you around the registry.

def council_tax_band(band_d_charge: Money, band: str, nation: str, on_date: str) -> CouncilTaxBandCharge
band_d_chargeMoneythe authority's Band D charge for the year, including any parish and precepts, in GBP
bandstring"A" to "H" (England, Scotland), "A" to "I" (Wales)
nationstring"england", "wales" or "scotland"
on_datedateany date in the financial year being charged
returnsCouncilTaxBandCharge

The type it declares, generated into your project

@dataclass(frozen=True)
class CouncilTaxBandCharge:
    """The charge and the ratio that produced it."""

    band: str
    #: the band's proportion
    ratio_numerator: int
    #: Band D's proportion: 9 (England, Wales) or 360 (Scotland)
    ratio_denominator: int
    #: Band D × numerator ÷ denominator, rounded half-up to the penny
    charge: Money

Your code names it in one line, in the file that uses it

from fune.property.council_tax_band import council_tax_band  # property.council-tax-band@^1
impl/python.py · 53 lines · open · raw

Imports name this capability’s declared dependencies, which fune builds next to it in your project; each one links to its page.

import re

from .math_round_div import round_div  ← from math.round-div ^1.0.0 · built alongside by fune
from .money_amount import Money, money  ← from money.amount ^1.0.0 · built alongside by fune
from .property_council_tax_band_data import BAND_RATIOS, BAND_RATIOS_HISTORY  ← this capability’s own data, compiled from data/band-ratios.json into the same file by fune build
from .property_council_tax_band_types import CouncilTaxBandCharge

_ISO_DATE = re.compile(r"[0-9]{4}-[0-9]{2}-[0-9]{2}")
_NATIONS = ("england", "wales", "scotland")
# Keeps Band D x the largest proportion exact as a JavaScript number; the same limit here.
_MAX_MINOR = 1_000_000_000_000


def council_tax_band(band_d_charge: Money, band: str, nation: str, on_date: str) -> CouncilTaxBandCharge:
    """The council tax for a band: Band D x the band's statutory proportion /
    Band D's, rounded half-up to the penny once. The proportions are dated
    rows, so a Scottish band E before April 2017 uses 440/360 and after it
    473/360."""
    if not isinstance(on_date, str) or not _ISO_DATE.fullmatch(on_date):
        raise ValueError('onDate must be an ISO date (YYYY-MM-DD), received "%s"' % (on_date,))
    if nation not in _NATIONS:
        raise ValueError('unknown nation "%s": use england, wales or scotland' % (nation,))
    if band_d_charge.currency != "GBP":
        raise ValueError("bandDCharge must be in GBP, received %s" % (band_d_charge.currency,))
    if band_d_charge.minor < 0 or band_d_charge.minor > _MAX_MINOR:
        raise ValueError(
            "bandDCharge must be between 0 and %d minor units, received %r" % (_MAX_MINOR, band_d_charge.minor)
        )
    found = None
    earliest = None
    for row in BAND_RATIOS:
        if row.nation != nation:
            continue
        if earliest is None or row.valid_from < earliest:
            earliest = row.valid_from
        if row.band != band or on_date < row.valid_from:
            continue
        if row.valid_to is not None and on_date > row.valid_to:
            continue
        found = row
    if found is None:
        if BAND_RATIOS_HISTORY != "full" and earliest is not None and on_date < earliest:
            raise ValueError(
                "no council tax band %s for %s on %s: this build was installed with history=%s, so it only carries rules from %s"
                % (band, nation, on_date, BAND_RATIOS_HISTORY, earliest)
            )
        raise ValueError("no council tax band %s for %s on %s" % (band, nation, on_date))
    return CouncilTaxBandCharge(
        band=band,
        ratio_numerator=found.numerator,
        ratio_denominator=found.denominator,
        charge=money(round_div(band_d_charge.minor * found.numerator, found.denominator, "half-up"), "GBP"),
    )

Install

fune build

With that line in your source, in a Python project (language python in fune.project), fune build resolves it and its 2 dependencies, pins them in fune.lock, downloads only the Python package of each, and builds the code above into your project’s .fune/build, one readable file per capability with a header linking back here. Or pin a range in fune.project and build in one step:

fune add property.council-tax-band
Download for Python property.council-tax-band-1.0.2-python.fune · 25,003 bytes sha256 f10958083d7b30c4009dbd52a61bf19bca5ae692610db7a14f907fff4849df9c

The manifest, vectors and README with only the Python implementation. Install it without the registry with fune add ./property.council-tax-band-1.0.2-python.fune, or fetch it from a terminal with fune pull property.council-tax-band@1.0.2:python.

The whole function, every language, is one file too: property.council-tax-band-1.0.2.fune, 31,407 bytes, sha256 5f8b90e78d630afbffb126b21c594e6bb7a5a0bf3fff236c747fe911a51d6094. It installs into a project of any language.

Customise it in your app

The seams this capability offers. Put a marker directly above a function of your own and fune build wires it into the built code; the package on the registry is not changed, the built file’s header lists it under CUSTOMISED, and fune hooks lists every hook in the project. How hooks work.

before — your function gets the arguments and returns them, changed or not, or throws to refuse the call.

# fune: before property.council-tax-band

after — your function gets the result and the arguments, and returns the final result.

# fune: after property.council-tax-band

replace — inside this capability’s code only, calls to a dependency go to your function, with the same signature. Other capabilities that use it are unaffected; write in * to replace it everywhere.

# fune: replace math.round-div in property.council-tax-band
# fune: replace money.amount in property.council-tax-band

step — your function runs at a numbered point inside the function’s body, receives the in-scope values it names as parameters, and may return replacements. List the points with fune show property.council-tax-band --steps.

# fune: step property.council-tax-band after <n|label>

Tests

A version published now needs at least 8 tests for every function, and one that expects the error for each function that throws; the registry refuses it otherwise. fune verify --all runs each case in TypeScript, Python and Rust, and a project runs them again with fune verify. This page lists the cases; it does not run them. The exact JSON is vectors.json.

CaseArgumentsExpected
England band A: six ninths of £2,000 is £1,333.33 £2,000.00, A, england, 2026-04-01 → band A, ratio numerator 6, ratio denominator 9, charge £1,333.33
England band B: £1,555.56 (1555.555... rounds up) £2,000.00, B, england, 2026-04-01 → band B, ratio numerator 7, ratio denominator 9, charge £1,555.56
England band D is the Band D charge itself £2,000.00, D, england, 2026-04-01 → band D, ratio numerator 9, ratio denominator 9, charge £2,000.00
England band E: eleven ninths, £2,444.44 £2,000.00, E, england, 2026-04-01 → band E, ratio numerator 11, ratio denominator 9, charge £2,444.44
England band H: twice Band D £2,000.00, H, england, 2026-04-01 → band H, ratio numerator 18, ratio denominator 9, charge £4,000.00
Wales band I: 21 ninths, £4,666.67 £2,000.00, I, wales, 2026-04-01 → band I, ratio numerator 21, ratio denominator 9, charge £4,666.67
Wales had no band I before the 2005 revaluation £2,000.00, I, wales, 2005-03-31 → error: no council tax band I for wales on 2005-03-31
Wales band I on 1 April 2005 £900.00, I, wales, 2005-04-01 → band I, ratio numerator 21, ratio denominator 9, charge £2,100.00
England has no band I £2,000.00, I, england, 2026-04-01 → error: no council tax band I for england
Scotland band E from April 2017: 473/360, £2,627.78 £2,000.00, E, scotland, 2026-04-01 → band E, ratio numerator 473, ratio denominator 360, charge £2,627.78
Show the other 14 tests
CaseArgumentsExpected
Scotland band H from April 2017: 882/360 of £2,000 is £4,900 £2,000.00, H, scotland, 2017-04-01 → band H, ratio numerator 882, ratio denominator 360, charge £4,900.00
Scotland band H the day before: 720/360, twice Band D £2,000.00, H, scotland, 2017-03-31 → band H, ratio numerator 720, ratio denominator 360, charge £4,000.00
Scotland band A unchanged by 2017: 240/360 £1,500.00, A, scotland, 2026-04-01 → band A, ratio numerator 240, ratio denominator 360, charge £1,000.00
an exact half penny rounds up: Scottish band E of £1.80 is 236.5p, so £2.37 £1.80, E, scotland, 2026-04-01 → band E, ratio numerator 473, ratio denominator 360, charge £2.37
band A of £1,789.47 is exactly £1,192.98, where 0.667 × Band D would give £1,193.58 £1,789.47, A, england, 2026-04-01 → band A, ratio numerator 6, ratio denominator 9, charge £1,192.98
zero Band D £0.00, C, england, 2026-04-01 → band C, ratio numerator 8, ratio denominator 9, charge £0.00
a lower-case band is not a band £2,000.00, a, england, 2026-04-01 → error: no council tax band a for england
Northern Ireland is not a council tax nation £2,000.00, A, northern-ireland, 2026-04-01 → error: unknown nation
before council tax existed £2,000.00, A, england, 1993-03-31 → error: no council tax band A for england on 1993-03-31
a Band D in euros is refused €2,000.00, A, england, 2026-04-01 → error: bandDCharge must be in GBP
a negative Band D is refused -£0.01, A, england, 2026-04-01 → error: bandDCharge must be between 0 and
a malformed date is refused £2,000.00, A, england, 2026-4-1 → error: onDate must be an ISO date
a trailing newline is not part of an ISO date £2,000.00, A, england, 2026-04-01 → error: onDate must be an ISO date
Arabic-Indic digits are not an ISO date £2,000.00, A, england, ٢٠٢٦-٠٤-٠١ → error: onDate must be an ISO date

More from the author

`councilTaxBand(money(200000, "GBP"), "A", "england", "2026-04-01")` is £1,333.33: six ninths of £2,000.

## The ratios, as dated data

`data/band-ratios.json` holds each nation's proportions with the dates they apply from:

| nation | from | A | B | C | D | E | F | G | H | I | |---|---|---|---|---|---|---|---|---|---|---| | England | 1 April 1993 | 6 | 7 | 8 | 9 | 11 | 13 | 15 | 18 | | | Wales | 1 April 1993 | 6 | 7 | 8 | 9 | 11 | 13 | 15 | 18 | | | Wales | 1 April 2005 | 6 | 7 | 8 | 9 | 11 | 13 | 15 | 18 | 21 | | Scotland | 1 April 1993 | 240 | 280 | 320 | 360 | 440 | 520 | 600 | 720 | | | Scotland | 1 April 2017 | 240 | 280 | 320 | 360 | 473 | 585 | 705 | 882 | |

England and Wales are ninths of Band D; Scotland is written in 360ths. Band I exists only in Wales, from the 2005 revaluation; asking for it elsewhere, or for a band before it existed, is an error. Scotland's 2017 change raised bands E to H only.

Pass any date inside the financial year (1 April to 31 March) being charged.

## Rounding

The exact fraction is rounded half-up to the penny, once. Authorities differ in how they round instalments; that is not this function's job.

## What it does not do

Discounts (the 25% single person discount), exemptions, disabled band reduction, premiums on empty and second homes, and splitting the charge into instalments. Northern Ireland has domestic rates, not council tax.

## Sources

- Local Government Finance Act 1992, section 5(1) (England: 6:7:8:9:11:13:15:18) and 5(1A) (Wales, for financial years beginning on or after 1 April 2005: 6:7:8:9:11:13:15:18:21): https://www.legislation.gov.uk/ukpga/1992/14/section/5 - Local Government Finance Act 1992, section 74(1) (Scotland: 240:280:320:360:473:585:705:882): https://www.legislation.gov.uk/ukpga/1992/14/section/74 - The Council Tax (Substitution of Proportion) (Scotland) Order 2016 (SSI 2016/368), for financial years beginning on or after 1 April 2017, the first change to the Scottish proportion since 1992: https://www.legislation.gov.uk/ssi/2016/368/made . The pre-2017 Scottish row (240:280:320:360:440:520:600:720) is the original 1992 proportion expressed in 360ths, identical to England's 6:7:8:9:11:13:15:18.

1.0.1 fixes Python accepting a trailing newline or non-ASCII digits in onDate; 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 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 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.2 marks it unreviewed and adds its attribution notices (NOTICE). The code and the tests are unchanged.

Files

PathBytes
NOTICE238
README.md3,965
data/band-ratios.json6,093
impl/python.py2,548
impl/rust.rs3,690
impl/typescript.ts2,467
vectors.json6,704