A K tax code is calculated in four short steps: HMRC adds up the untaxed income and benefits that reduce your Personal Allowance, subtracts the allowance from that total, drops the last digit of what remains, reduces the result by one, and puts a K in front. The code then tells your employer to treat that figure as extra taxable pay spread across the year. For 2026/27 the Personal Allowance stays frozen at £12,570, so the arithmetic below uses that number throughout.1GOV.UK. Income Tax Personal Allowance and the Basic Rate Limit From 6 April 2026 to 5 April 2028
The Four Steps HMRC Uses
A normal tax code gives you a tax-free amount. A K code does the opposite. It appears when the taxable items HMRC is collecting through PAYE add up to more than your allowance, so instead of subtracting tax-free pay, the code adds notional pay on top of your salary.2GOV.UK. If You Have a K in Your Tax Code
- Step 1. Total your deductions. Add every item HMRC is treating as taxable through your code: employer benefits from your P11D, untaxed State Pension, prior-year underpaid tax, the High Income Child Benefit Charge if it is being collected through PAYE, and any other adjustment shown on your coding notice.
- Step 2. Subtract the Personal Allowance. Take those total deductions and subtract £12,570 (plus any other allowances you qualify for). If the answer is negative, you still have tax-free pay and won’t have a K code. If it is positive, that positive figure is your minus allowance, and the K code process continues.
- Step 3. Drop the last digit, then reduce by one. Remove the final digit of the minus allowance. Then subtract one from what is left. This is the step people miss when checking their own code.3HM Revenue & Customs. PAYE Manual – Coding: Codes: How They Are Used and Calculated: K Codes
- Step 4. Add the K prefix. The letter K goes in front of the number. That is your tax code.
The K code affects income tax only. National Insurance is calculated from your actual earnings and is not touched by the code.
A Worked Example
Take an employee with a company car benefit valued at £20,000 a year, no other deductions, and the standard Personal Allowance.
- Minus allowance: £20,000 − £12,570 = £7,430
- Drop the last digit: 7,430 becomes 743
- Reduce by one: 743 becomes 742
- Add the prefix: K742
K742 tells the employer to add £7,430 to taxable pay over the year. On monthly pay, that is roughly £619 (£7,430 ÷ 12) added to taxable income each month, with income tax then calculated on the combined figure. The gross salary on the payslip doesn’t change; the tax deducted from it does.
HMRC’s Own Example
HMRC’s internal PAYE manual works through the same process with a company car benefit of £14,120 against the £12,570 allowance:3HM Revenue & Customs. PAYE Manual – Coding: Codes: How They Are Used and Calculated: K Codes
- £12,570 − £14,120 = −£1,550
- Drop the last digit and the minus sign: 155
- Reduce the last digit by one: 154
- Add K: K154
Both examples follow the same logic. If you run the numbers on your own code and land one higher than HMRC’s figure, the “reduce by one” step is the first thing to check.
The 50% Cap on Any Single Payslip
A K code can generate a very large tax figure on a single pay period, particularly when the benefit is high relative to salary. To stop a payslip from disappearing entirely, the income tax deducted in any one pay period is capped at 50% of your gross pay for that period.4HM Revenue & Customs. PAYE Manual – Coding: Codes: How They Are Used and Calculated: The Overriding Limit The cap originally applied only to K codes and has covered all tax codes since April 2015.5HM Revenue & Customs. Explanatory Memorandum to The Income Tax (Pay As You Earn) (Amendment) Regulations 2014
When the calculated tax exceeds half of gross pay, the employer deducts the 50% maximum and carries the shortfall forward to a later pay period.4HM Revenue & Customs. PAYE Manual – Coding: Codes: How They Are Used and Calculated: The Overriding Limit The debt doesn’t disappear; it shifts to the next payslip that has room under the cap.
What Feeds Into Step 1
The calculation is only as accurate as the deductions HMRC has recorded. The items commonly included are:
- Taxable employer benefits reported on your P11D, such as a company car or private medical insurance. A single high-value benefit can absorb the whole £12,570 on its own.2GOV.UK. If You Have a K in Your Tax Code
- State Pension received alongside employment. It is taxable but paid without deduction, so HMRC collects the tax through your employment code, reducing the allowance available against salary.2GOV.UK. If You Have a K in Your Tax Code
- Underpaid tax from a prior year, spread across the current year’s payslips.
- The High Income Child Benefit Charge, which HMRC can now collect through PAYE where adjusted net income exceeds £60,000, rather than requiring a Self Assessment return.6GOV.UK. Child Benefit Tax Calculator
- A Marriage Allowance transfer. If you transferred £1,260 of your allowance to a spouse or civil partner, your own allowance drops to £11,310, and the smaller allowance in Step 2 makes a K code more likely.7GOV.UK. Marriage Allowance
These items stack. Someone drawing the State Pension, driving a company car, and carrying a prior-year underpayment can end up with a K code running into four digits.
To check the figures HMRC has plugged into Step 1, look at your coding notice (the P2 sent when your code changes) or open the “Check your Income Tax” service on GOV.UK, which shows every item making up your code.8GOV.UK. Check Your Income Tax for the Current Year Cross-check the benefit values against your P11D or, if your employer payrolls benefits, against your payslip.9GOV.UK. Your P45, P60 and P11D Form
If the Maths Doesn’t Match Your Code
If you rerun the four steps and get a different answer from the code on your payslip, the deductions HMRC is using are probably out of date. Benefits get removed, cars get returned, and estimated figures often carry over from the previous year. You can update the underlying information through the “Check your Income Tax” service, and HMRC will recalculate the code and notify you and your employer within 15 working days. On monthly pay, the corrected code should show on the next payslip or the one after; weekly-paid employees should see it by the third payslip. If you have just started a new job, wait 35 days before contacting HMRC so the new employer’s data has time to arrive.10GOV.UK. Tax Codes: If You Think Your Tax Code Is Wrong