Functional Weave
Code in TypeScript

fleet.mileage-allowance@1.0.2

README.md

4,611 bytes · view raw

# fleet.mileage-allowance

HMRC Approved Mileage Allowance Payments (AMAPs) for business miles an
employee drives in their own vehicle: the approved amount (the most the
employer can pay tax-free), the taxable excess when the employer pays more,
and the Mileage Allowance Relief (MAR) the employee can claim when it pays
less. Passenger payments are worked out alongside.

## The 10,000-mile threshold

Cars and vans get the higher rate for the first 10,000 business miles in the
tax year (6 April to 5 April) and 25p after that; the threshold is shared by
every car and van the employee uses for the same employment. A claim is
usually one month of a year, so `previousMiles` says how many car and van
business miles were already paid for this tax year, and the claim is split at
the threshold. 9,500 miles already claimed plus 1,000 more is 500 at 45p and
500 at 25p (350.00), not 1,000 at 45p: paying 450.00 leaves 100.00 taxable.
Motorcycles and bicycles have one flat rate and no threshold.

## Rates

Dated rows in `data/amap-rates.json`, chosen by `onDate` (any date in the
tax year the journeys were made):

| vehicle | from | first 10,000 miles | after |
|---|---|---|---|
| car or van | 2002-04-06 | 40p | 25p |
| car or van | 2011-04-06 | 45p | 25p |
| car or van | 2026-04-06 | 55p | 25p |
| motorcycle | 2002-04-06 | 24p | 24p |
| bicycle | 2002-04-06 | 20p | 20p |
| passenger | 2002-04-06 | 5p a passenger mile | |

The 55p rate was announced on 21 May 2026 and applies retrospectively from
6 April 2026, so claims already paid at 45p in 2026-27 have 10p a mile of
relief (or can be topped up tax-free). AMAPs began on 6 April 2002; an earlier
date is an error. The table declares its effective columns, so a
`history=current` build refuses dates before its horizon instead of answering
them at today's rate.

## Excess and relief

`taxableExcess` is what was paid above the approved amount; the employer
reports it on a P11D or payrolls it. `relief` is the approved amount above what
was paid, which the employee claims as MAR. Only one of them is ever non-zero.
HMRC works both out over the whole tax year, so if a year's claims are
calculated one at a time, total them before reporting.

Passenger payments are 5p per mile for each fellow employee carried on
business in a car or van: two passengers for 30 miles is 60 passenger miles.
Anything paid above that is taxable; there is no relief below it. Passenger
payments for a motorcycle or bicycle are refused.

## Edges

Money must be GBP and not negative; miles must be whole and not negative.
Amounts are exact pence (miles times a whole-pence rate), so there is no
rounding.

## Sources

- HMRC, "Travel — mileage and fuel rates and allowances" (rates from 2011 to
  2026 and from 2026 to 2027, passenger 5p):
  https://www.gov.uk/government/publications/rates-and-allowances-travel-mileage-and-fuel-allowances/travel-mileage-and-fuel-rates-and-allowances
- HM Treasury / HMRC, "Increasing mileage rates" (45p to 55p, retrospective
  from 6 April 2026):
  https://www.gov.uk/government/publications/increase-to-approved-mileage-allowance-payments-amaps-and-self-employed-simplified-mileage-rates/increasing-mileage-rates
- HMRC, "Expenses and benefits: business travel mileage for employees' own
  vehicles" (rules for tax, MAR, passenger payments):
  https://www.gov.uk/expenses-and-benefits-business-travel-mileage/rules-for-tax
  and https://www.gov.uk/expenses-and-benefits-business-travel-mileage/passenger-payments
- HMRC Employment Income Manual EIM31240, "statutory mileage rates: kinds of
  vehicle": https://www.gov.uk/hmrc-internal-manuals/employment-income-manual/eim31240
- The Approved Mileage Allowance Payments (Rates) Regulations 2011, SI
  2011/896 (40p to 45p from 6 April 2011):
  https://www.legislation.gov.uk/uksi/2011/896/note/made
- Income Tax (Earnings and Pensions) Act 2003, s230 as enacted (40p/25p, 24p,
  20p) and s234 (5p passenger rate):
  https://www.legislation.gov.uk/ukpga/2003/1/section/230/enacted ,
  https://www.legislation.gov.uk/ukpga/2003/1/section/234
- Finance Act 2001, Schedule 12 (the same rates from 2002-03):
  https://www.legislation.gov.uk/ukpga/2001/9/schedule/12/part/1/2001-05-11

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

## 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 adds its attribution notices (NOTICE). The code and the tests are unchanged.