Skip to content

Every invoice to its box

I am a digital nomad: where do I pay tax if I move every few months?

Not spending 183 days in any country does not leave you without a tax residence. Spain counts sporadic absences and looks at where your business is based. How it is decided.

Hugo Marín is a Spanish web developer who has been living out of a rucksack since 2024. In 2025 he spent 150 days in Madrid, where he rents a room and has his main bank account; 90 days in Lisbon; 70 in Chiang Mai and 55 in Mexico City. He invoices clients in Germany and the United States as an autónomo (self-employed person) registered in Spain. As he did not spend more than 183 days anywhere, an acquaintance told him that he was not tax resident anywhere and did not have to file in Spain. It is a very widespread idea among people who work while travelling, and it is almost always wrong.

Nobody is resident "nowhere" just by falling short of 183 days

Tax residence is not a prize earned by piling up days in a country. Each state decides under its own rules whom it treats as resident, and you may be treated as resident by two countries at once, by just one or by none. What almost never happens, if you keep ties with Spain, is Spain giving up on treating you as resident.

Article 9.1 of Law 35/2006 on IRPF, Spanish personal income tax, sets out three routes:

  • a) Spending more than 183 days of the calendar year in Spanish territory. Sporadic absences are counted towards that period, unless you prove your tax residence in another country.
  • b) Having in Spain the main core or base of your activities or economic interests, directly or indirectly.
  • In addition, you are presumed, unless proven otherwise, to be resident if your spouse, not legally separated, and your dependent minor children habitually live in Spain.

Meeting any one of them is enough.

Hugo's days, counted the way Hacienda would count them

  1. Days in Spain in 2025: 150.
  2. Days abroad: 90 + 70 + 55 = 215.
  3. If those 215 days are treated as sporadic absences, they are added to the 150: 365 days counted in Spain.
  4. The only way to stop them being added is to prove tax residence in another country, normally with a certificate issued by that country's tax authority. Hugo has none: he did not stay anywhere long enough, nor did he register as a resident.
  5. Result under letter a): more than 183 days. Resident in Spain.
CriterionHugo's situationResult
Physical days in Spain150Not enough on their own
Sporadic absences215 days with no certificate of residence in another countryThey count
Days counted365More than 183
Core of economic activitiesRegistered in the RETA, invoices issued from Spain, main account in MadridPoints to Spain
FamilyNo spouse or childrenThe presumption does not apply

Even leaving the days aside, letter b) catches him: his activity is organised from Spain, he invoices with a Spanish tax number, he is paid into a Spanish account and he pays social security contributions here (the RETA is the Spanish scheme for the self-employed). In tax terms, his business is based in Spain.

The other country's certificate is the missing piece

The concept of sporadic absence has given rise to a great deal of argument, but the law offers a clear way out: if you prove that you are tax resident in another country, the absences stop being added. For a nomad who wants to stop being resident in Spain, that means genuinely settling in another state: living there, registering under its rules and obtaining its tax residence certificate. What those rules are in Portugal, Thailand or Mexico is confirmed by an adviser in each country; we do not give opinions on their law.

Until that certificate exists, the sensible starting point is that Spain treats you as resident and that you declare your worldwide income here.

When two countries claim you

Sometimes the problem is the opposite: Hugo settles in Lisbon, obtains resident status there and, at the same time, keeps the base of his business in Spain. Two states treat him as resident. That is what treaties to avoid double taxation are for. Most of those signed by Spain follow the OECD model, which breaks the tie with a ladder of criteria applied in order:

  1. Where you have a permanent home available to you.
  2. If you have one in both, where your centre of vital interests lies (closer personal and economic relations).
  3. If that cannot be determined, where you habitually live.
  4. Then, nationality.
  5. And, as a last resort, agreement between the tax authorities.

Each treaty has its own wording and you have to read the one that applies. How this ladder works in practice is in the guide to dual residence conflicts and in two countries consider me resident. Having two certificates, one from each country, is dealt with in residence certificates from two countries at once.

Stopping filing in Spain is not a neutral step

If you decide that you are not resident anywhere and Hacienda, as the Spanish tax office is commonly known, later concludes that you were resident in Spain, the adjustment will include the tax for all the undeclared years, interest and, probably, a penalty. There is no way of guaranteeing that an argument based on "absences that were not sporadic" will succeed. If your plan is to stop being resident, it is best done with paperwork: a certificate from the new country and a real change of economic base.

The year is looked at as a whole

In Spanish IRPF, residence is decided for the full calendar year, without splitting it. There is no such thing as "resident from January to May and non-resident for the rest": either you are an IRPF taxpayer for the whole year or you are not. For Hugo, that means that if in September 2026 he settles in Lisbon intending to stay, 2026 will most likely still be a year of residence in Spain, because of the days accumulated and because his business was still here, and the real question is what happens in 2027. Planning a change of residence halfway through the year without taking this into account is a frequent source of surprises.

What stays the same even if you travel

For a self-employed person who remains resident in Spain, working from Lisbon or Chiang Mai does not change how invoices are issued. The VAT on their services is still determined by the seat of their business and by who the client is; services to a German company are still located in Germany, and those for an American client still carry no Spanish VAT. If long stays in another country start to look like a fixed place of work there, another question arises, that of the permanent establishment, which we deal with in I work from several countries during the year.

What to keep from now on

Whether you want to stay resident in Spain or to stop being so, the burden of proof is yours. What helps is a travel log with dates of entry and exit (boarding passes, passport stamps, accommodation bookings), tenancy agreements and utility bills, and any residence certificate you obtain. The Spanish tax residence certificate, which Spain issues to its residents, also serves to avoid withholding by foreign clients.

If you are not sure which year you were resident where, you can send us your calendar of days and the details of your activity through the form for self-employed people with international clients.

How residence, VAT and income tax combine for people who work for clients in several countries from different places is explained on the Salama Tax page on self-employed people with international activity.

Your invoicing abroad, in two minutes

That is how long the form takes. The rest is our work.

Start here
Book a callWhatsApp