Contains AI-generated informationMore information

Non-resident tax in SpainArticle 5 of 5 · 6 min read

Working in Spain while living abroad, or the reverse

Explains where your pay is taxed if you live in one country and work in another, with Spain on one side. It covers short work visits, Spanish residents working abroad, frontier workers, and people living in Gibraltar or Andorra.

Key rules

  • 183 days: Pay for short work in Spain stays taxable only in your home country if you stay 183 days or fewer, your employer is not Spanish, and no Spanish permanent establishment bears the cost.
  • Spanish residents: If you are a Spanish tax resident, Spain taxes your worldwide income, including pay earned abroad.
  • Double tax: Foreign tax paid on the same income gives a credit, capped at the Spanish tax on that income.
  • Gibraltar: Spanish nationals living in Gibraltar are treated as Spanish tax residents.

The short answer

Two things decide where cross-border work is taxed: where you are tax resident and where you do the work. A tax treaty between Spain and your other country can change the result. Special arrangements exist for frontier workers. Start with your residence, then read the employment article of the treaty that applies to you.

You live abroad and work in Spain

Without a treaty, Spain taxes pay for work done in Spain. The flat rate is 24%. If you live in the EU or EEA, the rate is 19% and you can deduct expenses.

A treaty can move the tax to your home country. Most treaties follow the same three-part test. Your pay stays taxable only where you live if all of these are true:

  • You are in Spain for 183 days or fewer, in the tax year or in a 12-month period (the treaty says which).
  • Your employer is not resident in Spain.
  • No Spanish permanent establishment bears your pay.

If any one fails, Spain can tax the pay for the days you worked in Spain. Treaty wording varies, so read the one that applies to you.

Spanish pensions are taxed on a sliding scale of the gross yearly amount. Rates run from about 8% on smaller pensions up to 40% on large ones. Pensions from a foreign government and some others may be exempt under a treaty.

You are a Spanish tax resident working abroad

Spain taxes residents on worldwide income, including pay earned abroad. Two things can reduce the bill:

  • Exemption for work done abroad. Up to €60,100 a year of pay for work physically done abroad can be exempt. The work must be for a non-Spanish entity or a foreign permanent establishment. The destination country must have a similar tax, or a treaty with information exchange, and not be a tax haven. Conditions are checked each year.
  • Credit for foreign tax. If you paid tax abroad on the same income, you get a credit. It cannot exceed the Spanish tax on that income.

Frontier workers

Frontier workers live in one country and work in a neighbouring one. Each treaty has its own rule.

  • France: frontier workers are generally taxed where they live, with a special regime for those in frontier areas.
  • Portugal: work income is taxed where you live unless you do the work in the other country. A special frontier rule lets the country of work tax in certain cases.
  • Andorra: employment is taxed where the work is done. Your country of residence gives credit for the tax paid.

These rules are detailed and change. Ask the AEAT, the Spanish tax agency, which rule covers your case before you file.

Gibraltar and Andorra

Gibraltar has no tax treaty with Spain, so Spanish domestic rules apply. If you are a Spanish national living in Gibraltar, Spain treats you as a Spanish tax resident. That does not apply to other nationalities. A tax agreement in force since 2021 also treats people with a closer link to Spain as Spanish residents.

Andorra has had a treaty with Spain since 2015. It sets tie-breakers for residence and taxes employment where the work is done, with credit for double taxation.

Next steps

Use the decision, timeline and checklist below to find your case. If you are thinking of becoming a Spanish resident, read the article on Spanish tax residency first.

Choosing between options

Where will your employment income be taxed?

  • You are a Spanish tax resident working abroad: Spain taxes your worldwide income, but up to €60,100 a year of pay for work physically done abroad can be exempt if the conditions are met. Tax paid abroad gives a credit.

  • You live abroad and work in Spain: Spain taxes the pay for work done in Spain, unless a treaty leaves it to your country of residence.

  • You live in Andorra: The Andorra treaty taxes employment in the state where the work is done, and your country of residence gives credit for double taxation.

Start with where you are tax resident, then look at where you do the work. A treaty between the two countries can change the result, and Spanish rules apply where no treaty exemption is available.

Timeline and deadlines

  • Count your days in Spain, so you stay at 183 or fewer: throughout the tax year, or any 12-month period the treaty uses

  • Check that your employer is not resident in Spain and that no Spanish permanent establishment bears your pay: before you start work in Spain, and each time your pay arrangements change

  • If all three conditions hold, your pay stays taxable only in your country of residence: for the whole tax year

  • If any condition fails, expect Spain to tax the pay for the days you worked in Spain: from the first day that breaks a condition

Checklist

  • Work out whether you count as a Spanish tax resident, using the residency test explained in the article on Spanish income in the year before you arrive or after you leave.

  • Count the days you are present in Spain in the tax year, or in a 12-month period, and check whether you stay at 183 or fewer.

  • Check that your employer is not resident in Spain and that no permanent establishment in Spain bears your pay.

  • Ask the AEAT which frontier rules apply if you live in France, Portugal or Andorra and work in another of those countries.

  • Check the conditions for the exemption on pay for work done abroad each year, if you are a Spanish tax resident working abroad.

  • Claim a credit for foreign tax paid on the same income, remembering that it is capped at the Spanish tax on that income.

Frequently asked questions

Where are frontier workers between Spain and France taxed?

Frontier workers between Spain and France are generally taxed in the country where they live. A special regime applies to people living in the frontier areas, so check which zone you live in before you file.

Does Spain tax me as a resident if I live in Gibraltar?

Yes, if you are a Spanish national living in Gibraltar, Spain treats you as a Spanish tax resident under its anti-avoidance rules. This does not apply to other nationalities, but Gibraltar has no tax treaty with Spain. Under a 2019 tax agreement, people living in Gibraltar with a closer link to Spain can also be treated as Spanish residents.

Where is my pay taxed if I live in Andorra and work in Spain?

Pay for work done in Spain is taxed in Spain, because the Andorra treaty taxes employment where the work is exercised.

Can a Spanish resident working abroad keep some pay tax-free?

Yes, up to €60,100 a year of pay for work physically done abroad can be exempt, if you work for a non-Spanish entity or a foreign permanent establishment. The country where you work must also have a similar tax or a treaty with an information exchange clause. Tax you pay abroad on the same income gives a credit, capped at the Spanish tax on that income.

Need certainty before you act?

For important relocation decisions, speak with a qualified human specialist.

Consult with a human specialist

For decisions that depend on your own circumstances, a qualified human professional should look at your case. Tell us what you need help with and we will reply by email.

Always verify important information with the relevant official authority or a qualified adviser before acting. This website uses large language models together with various public data sources, official government documents and other established sources. Due to the amount of data on this website, some information might be wrong. Information may also be incomplete or outdated.

What matters to me

Tell us who you are and what you care about. Fit scores and rankings across the site follow your answers.