Build P11D and P11D(b) Benefits Returns into HMRC XML
Skill: Convert employee benefits data into HMRC P11D / P11D(b) submission XML
Region: United Kingdom
Category: PAYE — Expenses & Benefits (P11D / P11D(b))
Does: Takes employee benefit-in-kind data and produces the HMRC P11D and P11D(b) submission XML (Government Gateway / Expenses & Benefits service) — per-employee cash equivalents of benefits and the employer's Class 1A NIC declaration.
Standard: HMRC PAYE Expenses & Benefits online submission (IRenvelope, P11D message), tax year YYYY-YY.
The AI builds the submission payload. Authentication credentials and the Government Gateway transport are added by your filing tool. P11D/P11D(b) are due by 6 July after the tax year; Class 1A NIC is payable by 22 July (electronic). From April 2026 payrolling of most benefits becomes mandatory — confirm which benefits still require a P11D for the year you file.
When this applies
- An employer reports taxable benefits in kind and expenses not payrolled, per employee, for a tax year, and declares the Class 1A NIC on those benefits (P11D(b)).
- Benefits payrolled in real time through RTI are excluded from the P11D but still count toward Class 1A on the P11D(b).
- Not for cash earnings (those go through the FPS — see
paye-rti/build-rti-fps-xml.md).
Conversion procedure
- Read the source. Accept CSV/JSON/pasted benefit data plus employer PAYE reference and Accounts Office reference. Identify the tax year.
- Extract fields. Per employee: NINO, name, and each benefit (car, car fuel, van, van fuel, beneficial loans, private medical, assets, other). If a NINO, the employer PAYE reference, or a benefit's cash equivalent inputs are missing, stop and ask.
- Normalize. Dates
YYYY-MM-DD. Amounts to £ with 2 dp. Map each benefit to its P11D section letter (A–N). - Compute each cash equivalent (e.g. car benefit = list price × appropriate % − capital contributions; car fuel = fuel multiplier × appropriate %), sum benefits, then Class 1A NIC = total benefits subject to Class 1A × the Class 1A rate.
- Emit the XML (P11D per employee + a single P11D(b) total).
- Validate with the checklist.
Source → P11D field map
| From the source | → Target element |
|---|---|
| Employer PAYE reference | EmployerReference (district/reference) |
| Tax year ended 5 April | TaxYear |
| Employee NINO | Employee/NINO |
| Employee name | Employee/Name |
| Car list price, CO2 %, availability | CarAndCarFuel/... (Section F) |
| Car fuel benefit | CarAndCarFuel/Fuel |
| Van / van fuel | Van, VanFuel (Section G) |
| Beneficial loan | Loans (Section H) |
| Private medical | MedicalDental (Section I) |
| Assets transferred | AssetsTransferred (Section A) |
| Total cash equivalent (employee) | Employee/TotalBenefits |
| Total Class 1A benefits (employer) | P11Db/TotalClass1A |
| Class 1A NIC due | P11Db/Class1ANICs |
Document structure
IRenvelope
└── P11D (tax year, employer reference)
├── P11D (per employee)
│ ├── EmployeeName / NINO
│ ├── CarAndCarFuel (Section F)
│ ├── Van / VanFuel (Section G)
│ ├── Loans (Section H)
│ ├── MedicalDental (Section I)
│ └── ... other sections (A–N)
└── P11Db
├── TotalBenefits (Class 1A liable)
├── Class1ARate
└── Class1ANICs
Code tables
P11D sections (selected)
| Section | Benefit |
|---|---|
A |
Assets transferred |
B |
Payments made on behalf of employee |
C |
Vouchers and credit cards |
D |
Living accommodation |
E |
Mileage allowances |
F |
Cars and car fuel |
G |
Vans and van fuel |
H |
Interest-free / low-interest loans |
I |
Private medical / dental |
M |
Other items |
N |
Expenses payments |
Car-benefit inputs
| Input | Meaning |
|---|---|
ListPrice |
Manufacturer's list price + accessories |
AppropriatePercentage |
% from CO2 emissions band (and fuel type) |
CapitalContributions |
Employee capital contribution (max £5,000) |
DaysUnavailable |
Days the car was unavailable (pro-rata) |
Calculation rules
- Car benefit =
(ListPrice − capital contributions) × AppropriatePercentage × (available days / 365)− employee private-use payments, to 2 dp. - Car fuel benefit =
fuel benefit multiplier × AppropriatePercentage × (available days / 365)(nil if the employee reimburses all private fuel). - Total benefits (employee) = Σ of all section cash equivalents.
- Class 1A NIC = total benefits liable to Class 1A × the Class 1A rate (13.8% — verify the rate for the year). Includes payrolled benefits liable to Class 1A.
- Recompute every cash equivalent; flag mismatches with the source.
Worked example (end-to-end)
Input — one employee
Employer PAYE ref: 123/AB456 ; Tax year: 2025-26
Employee: Jane Doe, NINO QQ123456C
Company car: list price £30,000, CO2 appropriate % 25%, available all year, no capital contribution
Car fuel provided (multiplier £27,800) ; Private medical £600
After computation (intermediate)
car benefit = 30000 × 25% = 7500.00
car fuel = 27800 × 25% = 6950.00
medical = 600.00
total benefits = 7500 + 6950 + 600 = 15050.00
Class 1A NIC = 15050.00 × 13.8% = 2076.90
Output — P11D / P11D(b) XML
<?xml version="1.0" encoding="UTF-8"?>
<IRenvelope xmlns="http://www.govtalk.gov.uk/taxation/PAYE/P11D/16-17/1">
<P11D>
<TaxYear>2025-26</TaxYear>
<EmployerReference>123/AB456</EmployerReference>
<P11D>
<EmployeeName>Jane Doe</EmployeeName>
<NINO>QQ123456C</NINO>
<CarAndCarFuel>
<Car>
<ListPrice>30000.00</ListPrice>
<AppropriatePercentage>25</AppropriatePercentage>
<CashEquivalent>7500.00</CashEquivalent>
</Car>
<Fuel>
<CashEquivalent>6950.00</CashEquivalent>
</Fuel>
</CarAndCarFuel>
<MedicalDental>
<CashEquivalent>600.00</CashEquivalent>
</MedicalDental>
<TotalBenefits>15050.00</TotalBenefits>
</P11D>
<P11Db>
<TotalBenefits>15050.00</TotalBenefits>
<Class1ARate>13.8</Class1ARate>
<Class1ANICs>2076.90</Class1ANICs>
</P11Db>
</P11D>
</IRenvelope>
Normalisations shown: car benefit recomputed 30000 × 25% = 7500.00; car fuel 27800 × 25% = 6950.00; total 15050.00; Class 1A 15050.00 × 13.8% = 2076.90.
Validation checklist
- Employer PAYE reference, tax year, and each employee's NINO captured; nothing invented
- Each benefit mapped to the correct P11D section (A–N)
- Car/car-fuel cash equivalents recomputed from list price × appropriate % × availability
- Payrolled benefits excluded from per-employee P11D but included in Class 1A where liable
-
TotalBenefitsper employee = Σ section cash equivalents - Class 1A NIC = total Class 1A benefits × current rate (verify 13.8%)
- Submission validates against the current HMRC P11D schema; filed by 6 July
Last updated: 2026-06-13 — verify the tax year's car-benefit percentages, fuel multiplier, Class 1A NIC rate, mandatory-payrolling rules (from April 2026), and the current HMRC P11D schema before use.