Compliance
Tax residency and permanent establishment in Spain
Does selling into Spain or holding a Spanish NIF make your foreign company a tax resident? Usually not. Here is where the line actually sits, and what a permanent establishment really means.
12 Jun 2026 · 7 min read
One worry comes up again and again from foreign sellers: "If I start selling into Spain, or if I get a Spanish tax ID, does my company suddenly become a Spanish tax resident and owe Spanish tax on everything it earns?" It is a fair question, and the short answer is almost always no. Trading with Spanish customers, and holding a Spanish NIF so you can register for EPR compliance, does not by itself pull your worldwide profits into the Spanish tax net. This article draws the line so you can see where you actually stand.
This is general information rather than legal or tax advice. The rules below are the everyday version, and unusual set-ups can land differently, so treat this as a map, not a ruling.
When a person becomes tax resident in Spain
Start with individuals, because founders and directors sometimes confuse their own position with the company's. A physical person is treated as tax resident in Spain if any one of three triggers applies in a given calendar year.
- The 183 days rule: you spend more than 183 days of the calendar year in Spanish territory. Sporadic absences still count towards the total unless you can prove tax residency somewhere else.
- Centre of economic interests: the main base or core of your economic activities or interests sits directly or indirectly in Spain, even if you are not physically here for long.
- Family presumption: if your spouse (not legally separated) and your dependent minor children habitually reside in Spain, the law presumes you do too. This is a rebuttable presumption, so you can disprove it with evidence.
Meet none of those and you are, as an individual, a non-resident. Note that this is about you as a person. It is separate from where your company is resident, which is the question that really matters for a business selling into Spain.
When a company is treated as Spanish resident
A company is a Spanish tax resident if it satisfies any of three conditions: it was incorporated under Spanish law, it has its registered office in Spain, or it has its place of effective management in Spain. That last one is the interesting test. Place of effective management is where the key commercial and strategic decisions are actually taken, where the directors meet and run the business, not merely where a letterbox sits.
A company incorporated abroad, with its board and its real decision-making abroad, is normally not a Spanish resident. Selling products to Spanish buyers does not change that. So if you run a German, Dutch, or American company from your home country, shipping to customers in Spain, the company keeps its residency at home and pays its corporate tax there on its profits.
The concept that actually matters: permanent establishment
For a non-resident company, the real question is not residency at all. It is whether you have a permanent establishment, usually shortened to PE. A PE is a fixed presence in Spain substantial enough that Spain gets to tax the profit attributable to it. Cross the PE line and Spain taxes the slice of activity carried on here; stay on the right side of it and your only Spanish obligations are the narrow ones tied to specific transactions, such as VAT or EPR reporting.
Things that typically do create a permanent establishment:
- A fixed place of business in Spain: an office, a branch, a workshop, or a factory.
- A warehouse that you operate with your own staff, rather than mere storage at a third party.
- A dependent agent: someone in Spain who habitually acts for you and has, and uses, the authority to conclude contracts in your company's name.
Things that usually do not, on their own, create a permanent establishment:
- Holding stock at a third-party logistics provider purely for storage and delivery to customers.
- Occasional or one-off sales into Spain without any fixed base here.
- Selling through a genuinely independent distributor or agent who acts for many clients and buys and resells on their own account.
Where your country has a double-tax treaty with Spain, and most trading nations do, the treaty definition of permanent establishment governs, and it is generally narrower and more favourable than domestic law alone. The treaty is what stops the same profit being taxed twice.
How this maps onto your NIF
The permanent establishment question decides which kind of NIF your company needs, so the two topics are joined at the hip. A foreign company with no permanent establishment is issued a type N NIF, the N98, and its Spanish obligations stay limited to its actual operations here, such as registering for EPR and dealing with any VAT. A company that does have a permanent establishment takes a type W NIF instead and inherits a heavier compliance calendar, closer to that of a resident entity. If you want the mechanics of both, the foreign-company NIF guide walks through type N versus type W, how to obtain the number, and the ongoing duties. For the difference between the personal NIE and a company NIF, see NIE versus NIF, and if you are new to the term entirely, start with what a NIF number is.
So does an N98 make me a Spanish taxpayer?
No. Getting an N98 in order to register for EPR requirements does not make your company tax resident in Spain, and it does not automatically create a permanent establishment. The NIF is an identifier. It lets the Spanish authorities recognise your company so it can meet the specific obligations it has taken on, chiefly its EPR registration and reporting. It says nothing about where your profits are taxed. Thousands of foreign firms hold an N98 precisely because they sell into Spain from abroad and want to be compliant without setting up anything on the ground.
When you genuinely should get advice
The N98 route fits companies that sell in without a physical footprint. It is worth taking proper local advice when your situation starts to look more rooted, for example if any of the following are true.
- You put your own staff on the ground in Spain.
- You sign a lease and run premises here yourself.
- You appoint a local agent who can commit the company to contracts.
- You, as a director, spend a large part of the year physically in Spain.
Any of those can move you from clean non-resident selling towards a permanent establishment, and that is the moment to have your specific facts reviewed rather than relying on a general guide.
Recap and next step
Selling into Spain does not make your company resident here. Company residency turns on incorporation, registered office, or place of effective management, and running the business from abroad keeps it abroad. The real threshold for a foreign seller is the permanent establishment, and simply holding an N98 for EPR does not cross it. If you need the number to trade compliantly, you can start an application in minutes, or check the FAQ if a specific point is still open.