# UK Mileage Allowance and Advisory Fuel Rates Calculator (`landlordtools/uk-mileage-fuel-rates`) Actor

Business mileage claims at HMRC rates: approved mileage allowance (55p from 6 April 2026, 25p above 10,000 miles) for your own car, van, motorcycle or bike, and advisory fuel rates for company cars by quarter, fuel and engine size, including electric. Rate, amount and GOV.UK source per journey.

- **URL**: https://apify.com/landlordtools/uk-mileage-fuel-rates.md
- **Developed by:** [LandlordTools](https://apify.com/landlordtools) (community)
- **Categories:** Business, Automation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 journey priceds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## UK Mileage Allowance and Advisory Fuel Rates Calculator

Price business journeys at HMRC's rates. Each row shows the rate's effective dates and its GOV.UK source. It covers two schemes:

- **Approved mileage allowance payments**, for employees' own cars, vans, motorcycles and bikes. The car and van rate rose from 45p to **55p a mile on 6 April 2026**, and is 25p above 10,000 miles a tax year [1].
- **Advisory fuel rates**, for company cars. These change every quarter on 1 March, 1 June, 1 September and 1 December, and include electric home and public charging rates [4].

Rates change more often than people and AI assistants remember: GOV.UK's own worked example still uses 45p [1].

### What it does

- Splits car and van miles at **10,000 a tax year**, in date order, per employee. The count restarts on 6 April.
- Works out passenger payments (up to 5p a mile [3]) and the National Insurance qualifying amount. National Insurance uses one rate for every mile [2].
- In the **month after an advisory fuel rate change**, GOV.UK allows the previous rates too [4]. You get both in `alternative`, rather than the Actor choosing one.

### Quick start

Prefill input:

```json
{
  "journeys": [
    { "label": "Client visit, Leeds", "date": "2026-09-14", "miles": 120, "vehicle": "car", "passengers": 1 },
    { "label": "Site survey, crosses 10,000 miles", "date": "2026-09-21", "miles": 200, "vehicle": "car" },
    { "label": "Courier run", "date": "2026-09-22", "miles": 30, "vehicle": "motorcycle" },
    { "label": "Company car, petrol 1.6 litre", "date": "2026-09-10", "miles": 150, "vehicle": "car", "ownership": "company", "fuel": "petrol", "engineCc": 1598 },
    { "label": "Company EV, public charging", "date": "2026-08-20", "miles": 90, "vehicle": "car", "ownership": "company", "fuel": "electric-public" }
  ],
  "milesAlreadyClaimedThisTaxYear": 9850
}
```

The first of five rows:

```json
{
  "index": 0,
  "label": "Client visit, Leeds",
  "employee": null,
  "date": "2026-09-14",
  "taxYear": "2026-27",
  "vehicle": "car",
  "ownership": "own",
  "miles": 120,
  "scheme": "approved mileage allowance payments",
  "fuel": null,
  "engineCc": null,
  "band": "first 10,000 miles",
  "ratePence": 55,
  "firstRatePence": 55,
  "secondRatePence": 25,
  "milesAtFirstRate": 120,
  "milesAtSecondRate": 0,
  "carVanMilesThisTaxYear": 9970,
  "amount": 66,
  "passengers": 1,
  "passengerAmount": 6,
  "nationalInsuranceQualifyingAmount": 66,
  "rateEffectiveFrom": "2026-04-06",
  "rateEffectiveTo": null,
  "alternative": null,
  "source": "https://www.gov.uk/expenses-and-benefits-business-travel-mileage/rules-for-tax",
  "checkedOn": "2026-10-04",
  "error": null
}
```

The other rows:

| index | label | rate | amount | band |
|---|---|---|---|---|
| 1 | Site survey, crosses 10,000 miles | 55p / 25p | £59.00 | crosses 10,000 miles |
| 2 | Courier run | 24p | £7.20 | every business mile |
| 3 | Company car, petrol 1.6 litre | 17p | £25.50 | 1401cc to 2000cc |
| 4 | Company EV, public charging | 15p | £13.50 | Public charger |

Totals: mileage allowance £132.20, passenger payments £6.00, advisory fuel £39.00. The `OUTPUT` record adds the totals by employee and tax year, notes and sources.

### Input

| Field | Type | Meaning |
|---|---|---|
| `journeys` | array | Up to 10,000: `date`, `miles`, `vehicle` (`car`, `van`, `motorcycle`, `bicycle`), `ownership` (`own` or `company`). Company cars add `fuel` (`petrol`, `diesel`, `lpg`, `electric-home`, `electric-public`) and `engineCc`. Optional: `passengers`, `employee`, `label` |
| `milesAlreadyClaimedThisTaxYear` | number | Car and van miles already paid this tax year, for journeys without an `employee` |
| `milesAlreadyClaimedByEmployee` | object | The same, per employee: `{"A123": 4200}` |

### Output

| Field | Meaning |
|---|---|
| `scheme`, `band`, `ratePence` | Scheme, band and rate (null when a journey crosses 10,000 miles) |
| `firstRatePence`, `secondRatePence`, `milesAtFirstRate`, `milesAtSecondRate` | The 10,000-mile split |
| `amount`, `passengerAmount`, `nationalInsuranceQualifyingAmount` | Pounds |
| `rateEffectiveFrom`, `rateEffectiveTo`, `source`, `checkedOn` | Where the rate came from |
| `alternative` | In the month after a change: the previous rate and amount |
| `error` | Null, or why the journey couldn't be priced |

### Use from code

```bash
curl -X POST "https://api.apify.com/v2/acts/landlordtools~uk-mileage-fuel-rates/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"journeys": [{"date": "2026-09-14", "miles": 120, "vehicle": "car"}]}'
```

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('landlordtools/uk-mileage-fuel-rates').call({
  journeys: [{ date: '2026-09-14', miles: 120, vehicle: 'car' }],
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0].amount);
```

### Use with AI agents

Agents can call it through Apify's MCP server (https://mcp.apify.com) instead of quoting rates from memory. Try: "What can I pay tax-free for 300 business miles in my own car in September 2026?"

### Limits

- **Mileage allowance:** journeys from 6 April 2024.
- **Advisory fuel rates:** journeys from 1 September 2024, the earliest table GOV.UK lists.
- **Future journeys:** a date after today is refused until HMRC publishes its rates.
- **Hybrids:** use petrol or diesel [4].
- **Data:** bundled rates, checked on 4 October 2026.
- General information, not tax advice.

### Integrations

Power Platform, OpenAPI, Excel and Google Sheets files are in [`integrations/`](integrations/README.md). Apify's Zapier, Make and n8n apps work too.

### Pricing

Pay per event: $0.002 per journey ($2 per 1,000), plus Apify's minimal start fee.

### Related Actors

- [UK Tax Year and Week Helper](https://apify.com/landlordtools/uk-tax-year-week-helper): tax years and weeks.
- [UK Business Deadlines](https://apify.com/landlordtools/uk-business-deadlines): filing dates.
- [UK Working Days](https://apify.com/landlordtools/uk-working-days): working days and bank holidays.

### Sources

1. [GOV.UK: Business travel mileage, rules for tax](https://www.gov.uk/expenses-and-benefits-business-travel-mileage/rules-for-tax). Accessed 4 October 2026.
2. [GOV.UK: Business travel mileage, rules for National Insurance](https://www.gov.uk/expenses-and-benefits-business-travel-mileage/rules-for-national-insurance). Accessed 4 October 2026.
3. [GOV.UK: Business travel mileage, passenger payments](https://www.gov.uk/expenses-and-benefits-business-travel-mileage/passenger-payments). Accessed 4 October 2026.
4. [GOV.UK: Advisory fuel rates](https://www.gov.uk/guidance/advisory-fuel-rates). Accessed 4 October 2026.

[1]: https://www.gov.uk/expenses-and-benefits-business-travel-mileage/rules-for-tax

[2]: https://www.gov.uk/expenses-and-benefits-business-travel-mileage/rules-for-national-insurance

[3]: https://www.gov.uk/expenses-and-benefits-business-travel-mileage/passenger-payments

[4]: https://www.gov.uk/guidance/advisory-fuel-rates

# Actor input Schema

## `journeys` (type: `array`):

Each journey: date (YYYY-MM-DD), miles, vehicle (car, van, motorcycle, bicycle), ownership (own: mileage allowance; company: advisory fuel rates), and for company cars fuel (petrol, diesel, lpg, electric-home, electric-public) and engineCc. Optional: passengers (own cars and vans), employee, label.

## `milesAlreadyClaimedThisTaxYear` (type: `number`):

Business miles in own cars and vans already paid this tax year (for journeys without an employee), for the 10,000-mile split.

## `milesAlreadyClaimedByEmployee` (type: `object`):

For journeys with an employee: an object of employee: car and van miles already paid this tax year, for example {"A123": 4200}.

## Actor input object example

```json
{
  "journeys": [
    {
      "label": "Client visit, Leeds",
      "date": "2026-09-14",
      "miles": 120,
      "vehicle": "car",
      "passengers": 1
    },
    {
      "label": "Site survey, crosses 10,000 miles",
      "date": "2026-09-21",
      "miles": 200,
      "vehicle": "car"
    },
    {
      "label": "Courier run",
      "date": "2026-09-22",
      "miles": 30,
      "vehicle": "motorcycle"
    },
    {
      "label": "Company car, petrol 1.6 litre",
      "date": "2026-09-10",
      "miles": 150,
      "vehicle": "car",
      "ownership": "company",
      "fuel": "petrol",
      "engineCc": 1598
    },
    {
      "label": "Company EV, public charging",
      "date": "2026-08-20",
      "miles": 90,
      "vehicle": "car",
      "ownership": "company",
      "fuel": "electric-public"
    }
  ],
  "milesAlreadyClaimedThisTaxYear": 9850
}
```

# Actor output Schema

## `result` (type: `string`):

No description

## `output` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "journeys": [
        {
            "label": "Client visit, Leeds",
            "date": "2026-09-14",
            "miles": 120,
            "vehicle": "car",
            "passengers": 1
        },
        {
            "label": "Site survey, crosses 10,000 miles",
            "date": "2026-09-21",
            "miles": 200,
            "vehicle": "car"
        },
        {
            "label": "Courier run",
            "date": "2026-09-22",
            "miles": 30,
            "vehicle": "motorcycle"
        },
        {
            "label": "Company car, petrol 1.6 litre",
            "date": "2026-09-10",
            "miles": 150,
            "vehicle": "car",
            "ownership": "company",
            "fuel": "petrol",
            "engineCc": 1598
        },
        {
            "label": "Company EV, public charging",
            "date": "2026-08-20",
            "miles": 90,
            "vehicle": "car",
            "ownership": "company",
            "fuel": "electric-public"
        }
    ],
    "milesAlreadyClaimedThisTaxYear": 9850
};

// Run the Actor and wait for it to finish
const run = await client.actor("landlordtools/uk-mileage-fuel-rates").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "journeys": [
        {
            "label": "Client visit, Leeds",
            "date": "2026-09-14",
            "miles": 120,
            "vehicle": "car",
            "passengers": 1,
        },
        {
            "label": "Site survey, crosses 10,000 miles",
            "date": "2026-09-21",
            "miles": 200,
            "vehicle": "car",
        },
        {
            "label": "Courier run",
            "date": "2026-09-22",
            "miles": 30,
            "vehicle": "motorcycle",
        },
        {
            "label": "Company car, petrol 1.6 litre",
            "date": "2026-09-10",
            "miles": 150,
            "vehicle": "car",
            "ownership": "company",
            "fuel": "petrol",
            "engineCc": 1598,
        },
        {
            "label": "Company EV, public charging",
            "date": "2026-08-20",
            "miles": 90,
            "vehicle": "car",
            "ownership": "company",
            "fuel": "electric-public",
        },
    ],
    "milesAlreadyClaimedThisTaxYear": 9850,
}

# Run the Actor and wait for it to finish
run = client.actor("landlordtools/uk-mileage-fuel-rates").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "journeys": [
    {
      "label": "Client visit, Leeds",
      "date": "2026-09-14",
      "miles": 120,
      "vehicle": "car",
      "passengers": 1
    },
    {
      "label": "Site survey, crosses 10,000 miles",
      "date": "2026-09-21",
      "miles": 200,
      "vehicle": "car"
    },
    {
      "label": "Courier run",
      "date": "2026-09-22",
      "miles": 30,
      "vehicle": "motorcycle"
    },
    {
      "label": "Company car, petrol 1.6 litre",
      "date": "2026-09-10",
      "miles": 150,
      "vehicle": "car",
      "ownership": "company",
      "fuel": "petrol",
      "engineCc": 1598
    },
    {
      "label": "Company EV, public charging",
      "date": "2026-08-20",
      "miles": 90,
      "vehicle": "car",
      "ownership": "company",
      "fuel": "electric-public"
    }
  ],
  "milesAlreadyClaimedThisTaxYear": 9850
}' |
apify call landlordtools/uk-mileage-fuel-rates --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,landlordtools/uk-mileage-fuel-rates"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/YfdwCd8iH6aZYIFec/builds/yhNP4qnhGQPBRn3gw/openapi.json
