Tax

Tax basics for tech workers in Spain: IRPF, social security and the Beckham Law (2026)

How income tax (IRPF) and social security work for tech workers in Spain in 2026, and how the Beckham Law's 24% flat rate works for software engineers who move.

A calculator and office supplies arranged on a desk

Photo: maks_d on Unsplash

When you work in Spain as an employee, two things come out of your gross salary: income tax (IRPF) and social security contributions. Your employer deducts both from each payslip. If you have just moved to Spain, you may be able to choose a special regime instead of normal income tax. It is commonly called the Beckham Law, and it can lower your tax a lot.

This guide explains the basics for 2026. Tax depends on your situation, so use it as a starting point and check with an adviser (asesor fiscal) before you decide.

When you become a Spanish tax resident

You are a tax resident in Spain for a calendar year if either of these applies (IRPF law, article 9):

  • you spend more than 183 days in Spain in that year, or
  • the main centre of your business or economic interests is in Spain.

Tax residents pay IRPF on their income wherever it was earned (article 2), unless they opt for the Beckham Law.

Income tax (IRPF) under the normal rules

IRPF is a progressive tax. It has two parts: a state scale and a regional scale set by each autonomous community, such as Madrid or Catalonia (IRPF law, articles 63 and 74). Your total rate is the two added together, so it varies depending on where you live.

The state scale for general income (article 63):

Taxable income State rate
Up to €12,450 9.5%
€12,450 to €20,200 12%
€20,200 to €35,200 15%
€35,200 to €60,000 18.5%
€60,000 to €300,000 22.5%
Over €300,000 24.5%

The regional scale is added on top. Check your region’s rates in the Agencia Tributaria’s annual income tax manual.

A few basics:

  • Personal allowance. The general personal allowance (mínimo del contribuyente) is €5,550 a year (article 57). It is higher for people over 65 and for families.
  • Withholding. Your employer withholds tax from each payslip based on your expected yearly income and personal situation. Tell HR about your family situation so the rate is right.
  • Annual return. You settle the final amount in an annual return (declaración de la renta) the year after. The Agencia Tributaria publishes the dates each year.

Social security contributions

Employees pay a share of social security, and employers pay a larger share. For 2026, the employee rates on a permanent contract are (Order PJC/297/2026):

Contribution Employee share
Common contingencies (contingencias comunes) 4.70%
Unemployment (permanent contract) 1.55%
Vocational training 0.10%
Intergenerational equity mechanism (MEI) 0.15%
Total 6.50%

These rates apply to your contribution base, which is capped. The maximum base in 2026 is €5,101.20 a month. So the most an employee on these rates pays is about €331.58 a month.

There is also a solidarity contribution on pay above the cap. In 2026 the employee’s share is 0.19% on monthly pay between €5,101.21 and €5,611.32, 0.21% between €5,611.33 and €7,651.80, and 0.24% above €7,651.80. The employer pays the rest.

Your employer registers you with Social Security. Our relocation checklist explains what you need to do.

The Beckham Law (special regime for incoming workers)

The official name is the special regime for workers, professionals, entrepreneurs and investors moving to Spain (IRPF law, article 93). If you qualify and opt in, you are taxed under the rules for non-residents, with some special rules. For many software engineers this means a much lower rate.

How it is taxed

  • 24% on employment and other general income up to €600,000 a year.
  • 47% on the part above €600,000.
  • Savings income, such as dividends, interest and capital gains, is taxed at 19% to 30%.
  • All your employment income counts as Spanish income, even work done abroad. Other foreign income is generally not taxed in Spain under the regime.
  • Your employer withholds tax at 24% (47% on pay above €600,000 from the same employer).
  • You file a special return, form 151, instead of the normal IRPF return (Agencia Tributaria).
  • You are subject to Spanish wealth tax only on assets located in Spain.

Compare this with the normal rules above. Normal IRPF rates rise with income, while the Beckham rate stays at 24%. So the higher your salary, the more likely the Beckham Law is cheaper. But the regime doesn’t give you the personal allowances and deductions of the normal IRPF, so run the numbers for your case.

Social security is not affected. You pay the same contributions as everyone else.

How long it lasts

The regime applies to the year you become tax resident plus the following five years (article 93.1). That is up to six tax years.

Who qualifies

You can opt in if all of these apply (article 93.1):

  1. You were not a Spanish tax resident in the previous five years.
  2. You move to Spain, in the first year of the regime or the year before, because of one of these:
    • an employment contract with an employer in Spain, or a move ordered by your employer;
    • remote work for an employer, done entirely with computers and telecoms. Employees with Spain’s digital nomad visa are explicitly included;
    • becoming a director of a company (with limits for holding companies);
    • an entrepreneurial activity approved under Ley 14/2013;
    • work as a highly qualified professional for start-ups, or in training or R&D, where that work makes up more than 40% of your income.
  3. You don’t earn income through a permanent establishment in Spain (except in the entrepreneur and start-up professional cases).

Your spouse and children under 25 (any age if they have a disability), or the other parent of your children if you are not married, can also opt in. They must move with you, or later within your first year under the regime, meet the other conditions, and together have less taxable income than you (article 93.3).

How to apply: form 149

The deadline is strict. You must opt in within six months of the start date shown on your Social Security registration in Spain (IRPF regulation, article 116). Family members have six months from their arrival, or the main applicant’s deadline if that is later.

The steps, from the Agencia Tributaria:

  1. Get a tax ID (NIF) and be on the tax register (Censo de Obligados Tributarios). If you are not, file the registration form first.
  2. Upload your supporting documents through the Agencia Tributaria’s online procedure for this regime. You get a registration number.
  3. File form 149 online, quoting that registration number. Each person files their own form, and the main applicant files first.

Filing is electronic only (Agencia Tributaria). Once accepted, give the confirmation to your employer so it withholds at 24%.

If you miss the six-month window, you can’t opt in later. Start the paperwork as soon as your Social Security registration is done.

Is the Beckham Law right for you?

It tends to help if you:

  • earn a salary where normal IRPF rates would be well above 24%;
  • have significant income or assets outside Spain;
  • plan to stay in Spain for a few years.

It may not help if you:

  • earn a modest salary, where the normal rates are lower;
  • have a family and would benefit from the personal allowances and deductions under normal IRPF.

You can leave the regime by filing form 149 in November or December, with effect from the next year. Once you leave, you can’t opt in again (IRPF regulation, article 117).

Freelancers

This guide is about employees. If you work as a freelancer (autónomo), your social security, tax payments and filing are different. Get advice before you start.

Frequently asked questions

Is the Beckham Law worth it for software engineers?

Often, on higher salaries. Normal IRPF rates rise with income while the Beckham rate stays at 24%, so the more you earn, the more likely it is cheaper. But you lose the personal allowances and deductions of normal IRPF, which can matter on a modest salary or with a family. Run the numbers with an adviser.

What is the deadline to apply for the Beckham Law?

You must file form 149 within six months of the start date shown on your Social Security registration in Spain. If you miss that window, you can’t opt in later. Family members have six months from their arrival, or the main applicant’s deadline if that is later. Start the paperwork as soon as you are registered.

Can digital nomads use the Beckham Law?

Employees can. Remote work for an employer, done entirely with computers and telecoms, is one of the qualifying reasons for moving, and holders of Spain’s digital nomad visa are explicitly included. You still need to meet the other conditions, such as not having been a Spanish tax resident in the previous five years. Freelancers should get advice first.

Do I still pay social security under the Beckham Law?

Yes. The regime doesn’t affect social security, so you pay the same contributions as everyone else. In 2026 employees on a permanent contract pay 6.50% of a contribution base capped at €5,101.20 a month, which is at most about €331.58 a month, plus a small solidarity contribution on pay above the cap.

When do I become a tax resident in Spain?

You are a Spanish tax resident for a calendar year if you spend more than 183 days in Spain that year, or if the main centre of your business or economic interests is in Spain. Tax residents pay IRPF on their income wherever it was earned, unless they opt for the Beckham Law.

Is foreign income taxed under the Beckham Law?

All your employment income counts as Spanish income, even work you do abroad, and is taxed at 24% up to €600,000. Other foreign income is generally not taxed in Spain under the regime. You are also subject to Spanish wealth tax only on assets located in Spain. Check your own case with an adviser.

Next steps

This guide explains the rules in general terms. It isn’t tax advice. Rates and rules change; always check the official sources linked above.

Sources

  1. https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764
  2. https://www.boe.es/buscar/act.php?id=BOE-A-2007-6820
  3. https://sede.agenciatributaria.gob.es/Sede/irpf/tengo-que-presentar-declaracion/regimen-fiscal-aplicable-trabajadores-desplazados/regimen-especial.html
  4. https://sede.agenciatributaria.gob.es/Sede/irpf/tengo-que-presentar-declaracion/regimen-fiscal-aplicable-trabajadores-desplazados/modelo-149.html
  5. https://sede.agenciatributaria.gob.es/Sede/ayuda/manuales-videos-folletos/manuales-practicos/irpf-2024/c02-irpf-cuestiones-generales/sujecion-irpf-aspectos-personales/regimen-fiscal-especial-aplicable-trabajadores-desplazados/regimen-aplicable-trabajadores-desplazados/ejercicio-opcion-regimen-especial/plazo-ejercicio-opcion-regimen-especial.html
  6. https://www.boe.es/diario_boe/txt.php?id=BOE-A-2026-7296
  7. https://www.boe.es/buscar/act.php?id=BOE-A-2013-10074

Related jobs

View all