← Blog

Spain vs Portugal Tax Residency: The Differences That Actually Matter

Published May 19, 2026 · ~10 min read

Spain and Portugal sit side by side on the Iberian Peninsula and share a similar cost of living, climate, and quality of life. For nomads and expats choosing between them, the tax residency question comes down to a few specific differences — differences that most "Iberian comparison" guides get wrong or skip entirely.

This is not a country overview. It is a direct comparison of the rules that determine whether you become a tax resident, what happens if you try to stay in both countries, which special regimes are still available, and how hard each country is to exit once you've committed.

At a glance

Factor 🇪🇸 Spain 🇵🇹 Portugal
Day-count threshold 184+ days (more than 183) 184+ days (more than 183)
Counting window Calendar year (Jan 1 – Dec 31) Rolling 12 months (any window beginning or ending in the tax year)
Secondary triggers Economic interests + family ties (spouse + minor children) Habitual home on any day of the 12-month period
Special regime Beckham Law — flat 24%, up to 6 years (employed/director) IFICI — flat 20%, up to 10 years (research/academic/certified tech)
Availability of regime Open — if you qualify by employment type Open — but eligibility list is narrow
Standard tax rates Progressive, up to 47% Progressive, up to 48%
Exit complexity Standard exit for most countries; 4-year shadow for tax-haven moves Cleaner exit; rolling window is the main trap
Tax treaty network 90+ bilateral treaties 79+ bilateral treaties

The day-count gap: how each country counts, and why it matters

Both countries require more than 183 days, but they count them over different windows — and the difference is material for nomads managing their time carefully.

Spain: calendar year, and it takes 184 days to trigger

Spain's primary test (Article 9 LIRPF) counts physical presence in Spanish territory during the calendar year (January 1 – December 31). The threshold is "more than 183 days" — meaning 184 days crosses it; 183 does not, on this test alone.

The calendar-year window has a practical advantage: it resets cleanly every January 1. If you track carefully, you know exactly where you stand. The main complication is the sporadic absences rule: brief trips out of Spain are counted as Spanish presence unless you can prove tax residency elsewhere during that period. If you leave Spain for a 2-week trip to Lisbon with no Portuguese tax residency to show, Spain may count those weeks as Spanish days.

Portugal: rolling 12-month window, and it also takes 184

Portugal's test (Código do IRS, Article 16) counts presence in any 12-month period that begins or ends in the tax year. The threshold is "more than 183 days", the same line as Spain's: 183 days is not enough on this test alone. A day counts if it includes a night spent in Portugal.

The rolling window is the more dangerous of the two for nomads. A stay from October through mid-April spans two calendar years, but may add up to more than 183 days within a single 12-month window. Portugal's AT (tax authority) can pick the window that captures your presence — and the first-year effect can surprise people who think they've managed their calendar carefully.

Example: You arrive in Lisbon on 1 October 2026 and leave on 15 April 2027. You spend 196 nights in Portugal: 92 in 2026 and 104 in 2027. Neither calendar year passes 183, so a calendar-year count like Spain's would not catch you. Portugal counts any 12-month period that begins or ends in the tax year: from 1 October 2026 to 30 September 2027 you have 196 days, more than 183. You are a Portuguese tax resident from your first day, 1 October 2026. The rolling window catches you when the calendar window doesn't.

What if you split time between Spain and Portugal?

This is the most common scenario in the nomad community, and the answer requires tracking two separate windows simultaneously.

The day-count arithmetic: If you stay 90 days in Spain and 90 days in Portugal in the same calendar year, neither country's day-count threshold is reached — both need more than 183 (Spain in the calendar year, Portugal in any 12-month period that begins or ends in it). On day counts alone, you are resident of neither.

But Portugal's habitual home rule can still catch you. If, on any day of the 12-month period, you keep a long-term lease or owned property in Lisbon in conditions that suggest you intend to keep and occupy it as your habitual residence, Portugal can establish residency on the habitual home test regardless of days. Someone who keeps an Airbnb-style month-to-month rental in Porto while travelling 9 months of the year may still be a Portuguese tax resident if the rental is kept under circumstances suggesting intent to occupy it as a habitual home.

And Spain's economic interests test is separate from days. If most of your revenue comes from Spanish clients, a Spanish-registered company, or Spanish real estate income, Spain may claim you as resident on the economic interests test even with low days.

If both countries claim you simultaneously: The Spain–Portugal tax treaty (signed 1993, updated 1995) has OECD-standard tie-breaker rules applied in sequence:

  1. Permanent home (which country has your permanent home?)
  2. Centre of vital interests (where is your economic and personal life centred?)
  3. Habitual abode (where do you spend more time?)
  4. Nationality

In practice, dual Iberian residency disputes are rare but slow and fact-intensive when they occur. The simplest avoidance: maintain a long-term home in only one country at a time.

The special regimes: Beckham Law vs IFICI

Both countries have had flagship incentive regimes for incoming residents. Their current states are very different.

Spain: Beckham Law (still open)

Spain's Beckham Law (Régimen especial para trabajadores desplazados a territorio español, Article 93 LIRPF) is available to new Spanish tax residents who:

Benefits: flat 24% tax on Spanish-sourced income up to €600,000 (instead of progressive rates to 47%), and no tax on most foreign-source income. Duration: up to 6 years.

Who cannot access it: pure freelancers, remote workers without a Spanish employer, digital nomads without a Spanish employment contract. The 2023 reform created an exception for digital nomad visa holders under narrow conditions, but this remains a specialist case requiring careful qualification.

Beckham Law verdict

Genuinely valuable for employed professionals relocating to Spain for a company. Largely inaccessible for the self-employed and remote-only crowd. If you don't have a Spanish employment contract, this regime is not for you.

Portugal: IFICI (NHR is closed)

Portugal's Non-Habitual Resident (NHR) scheme closed to new applicants on January 1, 2024. It was Portugal's most significant differentiator — and it is gone for anyone who didn't complete qualifying immigration steps before October 10, 2023.

The successor, IFICI (Incentivo Fiscal à Investigação Científica e Inovação), offers a flat 20% rate on Portuguese-source income for 10 years to:

Who cannot access it: retirees, passive income recipients, general remote workers, freelancers without a qualifying Portuguese employment contract.

IFICI verdict

Useful for a narrow slice of technology professionals hired by Portuguese institutions or certified companies. For everyone else — including the majority of digital nomads who came to Portugal for NHR — Portugal is now taxed at standard rates up to 48%. The NHR era is over.

Which country is harder to exit?

Once you've become a tax resident of either country, leaving has different complexity.

Exiting Spain

Spain's exit is relatively clean for moves to standard (non-haven) countries: stop meeting the 183-day, economic interests, and family ties tests. The key exception is the 4-year rule for tax-haven moves: a Spanish national who leaves for a jurisdiction on Spain's tax-haven list stays a Spanish taxpayer for the year of the move and the four following years. Andorra left that list in 2011, so the rule does not reach it.

For moves to France, Germany, Portugal, UAE, or other non-blacklisted countries: no exit shadow. Standard exit applies once you cease meeting the residency tests.

Exiting Portugal

Portugal's exit has one primary trap: the rolling 12-month window. You may believe you've left Portugal (moved your home, changed your habits) but still have more than 183 days of presence in a rolling window that straddles the departure date. Tracking the rolling window during the exit year is essential.

Portugal also has a quirk for very long-term residents: under the general principle of domicile fiscal, if your center of life was in Portugal for an extended period, AT may contest an abrupt departure. But for most residents, a clean exit (ending the lease or commercially renting the property, leaving by mid-year) managed carefully around the rolling window is sufficient.

Portugal has no blanket "exit shadow" for moves to standard jurisdictions. The habitual home rule is the main landmine on the way out: it looks at any day of the 12-month period, not just on 31 December, so after you leave, don't keep a Portuguese home in conditions that suggest you intend to keep living in it.

Considering Andorra from Spain? Spain's 4-year rule for tax havens no longer applies to Andorra, which left Spain's list in 2011, but Spain's own residency tests still do. Read the Andorra tax residency rules →

Who should choose Spain vs Portugal?

This is the question most comparison pages avoid. Here is the honest answer for the most common cases:

Choose Spain if:

Choose Portugal if:

Neither, if:

Tracking Iberian days across multiple countries?

Elcano tracks Spain, Portugal, and 25+ other countries simultaneously — calendar-year and rolling-window modes, no signup, data stays on your device.

Try Elcano

Further reading

This article provides general comparative information on Spanish and Portuguese tax residency rules as of May 2026. It is not legal or tax advice. Rules in both countries have changed substantially in recent years and continue to evolve. Your specific residency status depends on the facts of your individual situation. Consult a qualified tax advisor in both jurisdictions before making relocation decisions.