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.33council_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.
pub fn council_tax_band(band_d_charge: &Money, band: &str, nation: &str, on_date: &str) -> CouncilTaxBandCharge
| band_d_charge | Money | the authority's Band D charge for the year, including any parish and precepts, in GBP |
| band | string | "A" to "H" (England, Scotland), "A" to "I" (Wales) |
| nation | string | "england", "wales" or "scotland" |
| on_date | date | any date in the financial year being charged |
| returns | CouncilTaxBandCharge |
The type it declares, generated into your project
/// The charge and the ratio that produced it.
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct CouncilTaxBandCharge {
pub band: String,
/// the band's proportion
pub ratio_numerator: i64,
/// Band D's proportion: 9 (England, Wales) or 360 (Scotland)
pub ratio_denominator: i64,
/// Band D × numerator ÷ denominator, rounded half-up to the penny
pub charge: Money,
}
Your code names it in one line, in the file that uses it
fune!(property.council-tax-band@^1); // then call council_tax_band(…)
Imports name this capability’s declared dependencies, which fune builds next to it in your project; each one links to its page.
use super::funejson::Value; ← the fune runtime: the JSON value the test vectors use; fune build keeps it only where a signature takes one
use super::math_round_div::round_div; ← from math.round-div ^1.0.0 · built alongside by fune
use super::money_amount::{money, money_from_value, money_to_value, Money}; ← from money.amount ^1.0.0 · built alongside by fune
use super::property_council_tax_band_data::{BandRatio, BAND_RATIOS, BAND_RATIOS_HISTORY}; ← this capability’s own data, compiled from data/band-ratios.json into the same file by fune build
// Keeps Band D × the largest proportion exact as a JavaScript number; the same limit here.
const MAX_MINOR: i64 = 1_000_000_000_000;
fn is_iso_date(value: &str) -> bool {
let bytes = value.as_bytes();
bytes.len() == 10
&& bytes.iter().enumerate().all(|(i, b)| if i == 4 || i == 7 { *b == b'-' } else { b.is_ascii_digit() })
}
/// The council tax for a band: Band D × 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.
///
/// # Panics
/// Panics on a malformed date, an unknown nation, a Band D charge not in GBP
/// or out of range, or a band the nation did not have on that date.
pub fn council_tax_band(band_d_charge: &Money, band: &str, nation: &str, on_date: &str) -> CouncilTaxBandCharge {
if !is_iso_date(on_date) {
panic!("onDate must be an ISO date (YYYY-MM-DD), received \"{}\"", on_date);
}
if !["england", "wales", "scotland"].contains(&nation) {
panic!("unknown nation \"{}\": use england, wales or scotland", nation);
}
if band_d_charge.currency != "GBP" {
panic!("bandDCharge must be in GBP, received {}", band_d_charge.currency);
}
if band_d_charge.minor < 0 || band_d_charge.minor > MAX_MINOR {
panic!("bandDCharge must be between 0 and {} minor units, received {}", MAX_MINOR, band_d_charge.minor);
}
let mut found: Option<&'static BandRatio> = None;
let mut earliest: Option<&'static str> = None;
for row in BAND_RATIOS {
if row.nation != nation {
continue;
}
if earliest.map_or(true, |e| row.valid_from < e) {
earliest = Some(row.valid_from);
}
if row.band != band || on_date < row.valid_from {
continue;
}
if let Some(to) = row.valid_to {
if on_date > to {
continue;
}
}
found = Some(row);
}
let row = match found {
Some(row) => row,
None => {
if BAND_RATIOS_HISTORY != "full" {
if let Some(e) = earliest {
if on_date < e {
panic!(
"no council tax band {} for {} on {}: this build was installed with history={}, so it only carries rules from {}",
band, nation, on_date, BAND_RATIOS_HISTORY, e
);
}
}
}
panic!("no council tax band {} for {} on {}", band, nation, on_date)
}
};
CouncilTaxBandCharge {
band: band.to_string(),
ratio_numerator: row.numerator,
ratio_denominator: row.denominator,
charge: money(round_div(band_d_charge.minor * row.numerator, row.denominator, "half-up"), "GBP"),
}
}
pub fn council_tax_band_charge_to_value(result: &CouncilTaxBandCharge) -> Value {
Value::obj(vec![
("band", Value::str(&result.band)),
("ratioNumerator", Value::Int(result.ratio_numerator)),
("ratioDenominator", Value::Int(result.ratio_denominator)),
("charge", money_to_value(&result.charge)),
])
}
pub fn fune_vector(args: &[Value]) -> Value {
council_tax_band_charge_to_value(&council_tax_band(
&money_from_value(&args[0]),
args[1].as_str(),
args[2].as_str(),
args[3].as_str(),
))
}Install
fune build
With that line in your source, in a Rust project (language rust in fune.project), fune build resolves it and its 2 dependencies, pins them in fune.lock, downloads only the Rust 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. A crate’s build.rs runs it before every compile. Or pin a range in fune.project and build in one step:
fune add property.council-tax-band
The manifest, vectors and README with only the Rust implementation. Install it without the registry with fune add ./property.council-tax-band-1.0.2-rust.fune, or fetch it from a terminal with fune pull property.council-tax-band@1.0.2:rust.
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.
| Case | Arguments | Expected | |
|---|---|---|---|
| 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
| Case | Arguments | Expected | |
|---|---|---|---|
| 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
| Path | Bytes |
|---|---|
| NOTICE | 238 |
| README.md | 3,965 |
| data/band-ratios.json | 6,093 |
| impl/python.py | 2,548 |
| impl/rust.rs | 3,690 |
| impl/typescript.ts | 2,467 |
| vectors.json | 6,704 |