How to Calculate Your Tax Code: Letters, K Codes, and Emergency Codes

To calculate your UK tax code, start with your Personal Allowance (£12,570 for most people in 2026/27), add any tax reliefs you’re entitled to, subtract the value of employer benefits and any untaxed income, drop the last digit of the result, and add the letter that matches your circumstances. That final combination — a number and a letter, like 1257L — is what your employer or pension provider uses under PAYE to work out how much income tax to take from each payslip.1GOV.UK. Income Tax – How You Pay Income Tax

The Calculation, Step by Step

HMRC begins with your Personal Allowance, the amount you can earn before paying any income tax. For 2026/27 that figure is £12,570, and it has been frozen at that level since April 2022 with the freeze scheduled to run until April 2031.2UK Parliament. Direct Taxes – Rates and Allowances for 2026/27

From that starting figure, HMRC subtracts anything that reduces your tax-free amount. The three most common deductions are the taxable value of employer benefits (a company car, private medical insurance, an interest-free loan, reported on a P11D or processed through payroll),3GOV.UK. Tax on Company Benefits – Other Company Benefits You’ll Pay Tax On untaxed income such as rental profits or savings interest that hasn’t already had tax withheld, and unpaid tax from a previous year that HMRC is spreading across the current year’s code.

HMRC may also add to your tax-free amount if you claim reliefs like allowable employment expenses. Once every addition and subtraction is applied, you have your net tax-free amount for the year.4GOV.UK. Tax Codes – What Your Tax Code Means

The final step is formatting: drop the last digit and add the suffix letter. A tax-free amount of £12,570 becomes 1257. If employer benefits worth £2,000 reduce it to £10,570, the code becomes 1057L. Benefits of £4,320 give £8,250 tax-free and a code of 825L.

A Worked Example

Suppose you earn a salary, receive private medical insurance worth £900, and have £500 in untaxed savings interest:

  • Personal Allowance: £12,570
  • Minus medical insurance: −£900
  • Minus untaxed interest: −£500
  • Net tax-free amount: £11,170
  • Drop the last digit: 1117
  • Add the suffix: 1117L

Your employer spreads that £11,170 evenly across your pay periods, taxing everything above it at the applicable rate.

What the Letter on the End Means

The letter tells your employer which rules to apply to the number.4GOV.UK. Tax Codes – What Your Tax Code Means

  • L — you get the standard Personal Allowance. This is by far the most common suffix.
  • M — you’ve received 10% of your partner’s Personal Allowance through Marriage Allowance, giving you an extra £1,260 tax-free.
  • N — you’ve transferred 10% of your allowance to your partner, reducing your tax-free amount by £1,260.
  • T — your code contains items HMRC needs to review before changes are made automatically, often because your income reduces your Personal Allowance.

Marriage Allowance is only available when one partner earns below the Personal Allowance and the other is a basic-rate taxpayer, and the transfer is always a flat 10% of the Personal Allowance rather than 10% of whatever allowance the transferor still has left.5GOV.UK. PAYE Manual – PAYE11075 – Coding: Codes: How They Are Used and Calculated: Suffix Codes: The Suffix

Codes for a Second Job or Pension

Only one source of income gets your Personal Allowance. Everything else is usually taxed at a flat rate with no tax-free slice:

  • BR — every pound is taxed at the basic rate (20%).
  • D0 — every pound is taxed at the higher rate (40%).
  • D1 — every pound is taxed at the additional rate (45%).
  • NT — no tax is deducted from this income.

Which one HMRC assigns depends on your total earnings. If your main job already pushes you into the higher-rate band, a second job may get D0 because every pound from it lands in that bracket. Getting the allocation wrong between jobs is one of the most common causes of an unexpected bill, so check the code on each source of income whenever you start a new one.

K Codes: Deductions Bigger Than Your Allowance

When the value of your benefits and other deductions is larger than your Personal Allowance, the calculation produces a negative number and HMRC issues a K code. Instead of giving you a tax-free amount, a K code adds notional income to your pay so tax can be collected on it.

If your Personal Allowance is £12,570 but taxable benefits total £15,000, the negative allowance is £2,430. Drop the last digit and put K at the front: K243. Your employer treats you as though you earn an extra £2,430 on top of your salary when calculating tax. There’s a safeguard built in: no more than half your pay in any period can be taken as tax under a K code, and anything above that is carried forward.

Scottish and Welsh Prefixes

An S at the start means you’re a Scottish taxpayer; a C means you’re Welsh. For 2026/27 Welsh rates match those in England and Northern Ireland, so C1257L produces the same tax as 1257L; the prefix simply readies the payroll system in case Welsh rates diverge later.6GOV.UK. Income Tax in Wales Scotland uses a different structure with six bands, from a 19% starter rate up to 48% at the top.7GOV.UK. Income Tax in Scotland – Current Rates S1257L applies the same tax-free amount as 1257L, but your employer applies Scottish rate bands above the threshold, so two people with otherwise identical codes can take home different amounts.

When the Simple Formula Doesn’t Apply

Emergency Codes With W1 or M1

If you start a new job before your employer has your previous income and tax details, you may be put on an emergency code. The number is usually 1257L, but tagged with W1 (paid weekly) or M1 (paid monthly).8GOV.UK. Tax Codes – Emergency Tax Codes

The W1/M1 tag switches the calculation from cumulative to non-cumulative. Normally your employer looks at your total income for the tax year so far and adjusts each pay period so the numbers balance out over twelve months. On an emergency code, each period is calculated in isolation, as if you were going to earn that same amount every period all year. This often means overpaying early on, and the overpayment corrects itself once HMRC issues your proper code.

Income Over £100,000

If your adjusted net income tops £100,000, your Personal Allowance shrinks by £1 for every £2 above the threshold and disappears entirely at £125,140.9GOV.UK. Income Tax Rates and Personal Allowances Someone earning £112,000 loses £5,715 of allowance (half of the £11,430 over £100,000), leaving £6,855 and a code of 685T. The T signals that HMRC will manage the code manually rather than letting the employer adjust it.

Check Your Code and Fix It if It’s Wrong

You can see your current code and the figures behind it at any time through HMRC’s online service. Sign in with Government Gateway and you’ll get your Personal Allowance, income estimates, and every deduction HMRC has applied. Update anything that looks wrong through the same service.10GOV.UK. Check Your Income Tax for the Current Year

Every time HMRC changes your code they send a PAYE coding notice (form P2) that breaks down the calculation line by line: each allowance that increases your tax-free amount, each deduction that reduces it, and the resulting code. It also shows the name of your employer or pension provider, and lists a separate code for each source of income if you have more than one. If a benefit you no longer receive is still there, or an old employer is still listed, or an estimated figure looks too high, those are the signals to contact HMRC.

Codes commonly go wrong when HMRC uses outdated benefit figures, estimates untaxed income too high or low, applies a previous underpayment you’ve already settled, or fails to update after you leave a job. If you’ve just started a new job, wait at least 35 days before contacting HMRC so your new employer’s records have time to reach them.11GOV.UK. Tax Codes – If You Think Your Tax Code Is Wrong Once HMRC agrees a change is needed, they update both you and your employer within 15 working days, and any tax over- or underpaid while the wrong code was in force is corrected automatically through the new code for the rest of the year.