>
HomeServicesTax LawSpain

Tax Law in Spain

A foreign-owned company operating in Spain receives a tax assessment it did not expect. The amount is substantial. The deadline to respond is short. Missing that window means losing the right to contest the assessment entirely – and the liability becomes final. This situation is more common than many international businesses anticipate, and it is almost always avoidable with proper tax planning in place before the dispute arises.

Tax law in Spain governs how resident and non-resident entities are taxed on income, capital gains, dividends, and cross-border transactions. International businesses must comply with Spanish corporate income tax rules, withholding tax obligations, and transfer pricing requirements from the moment they establish a taxable presence. Deadlines for filing, contesting assessments, and applying tax treaty benefits are strictly observed by the Spanish tax authorities.

This page covers the principal tax instruments available in Spain, the procedures that international clients most frequently encounter. Common pitfalls that carry serious financial consequences. Additionally, the cross-border considerations that arise when operating between Spain, Portugal, and the broader EU.

The Spanish tax environment for international business

Spain operates a comprehensive tax system administered primarily by the Agencia Estatal de Administración Tributaria (State Tax Administration Agency, known as AEAT). Regional authorities in the Basque Country and Navarre administer their own tax regimes under the concierto económico (economic agreement) system. For most international clients, the general regime administered by AEAT applies.

Spanish tax legislation imposes corporate income tax on resident companies on their worldwide income. Non-resident companies are subject to tax on Spanish-source income and, critically, on income attributable to a permanent establishment in Spain. The permanent establishment concept is one of the most contested areas in Spanish tax law. Courts in Spain – including the Tribunal Supremo (Supreme Court of Spain) – have consistently interpreted this concept broadly. A dependent agent, a construction site of sufficient duration, or a server used for commercial activity can each constitute a taxable presence.

Spanish corporate legislation recognises two principal business vehicles: the Sociedad Anónima (SA), used for larger or publicly traded entities, and the Sociedad de Responsabilidad Limitada (SL), the private limited company preferred by most foreign investors. The choice of vehicle has direct tax consequences. Both require registration in the Registro Mercantil (Commercial Register) through a public deed executed before a Notario (Spanish notary public). Incorporation costs, share capital requirements, and subsequent tax filing obligations differ between the two forms.

Tax residency in Spain is determined by the place of incorporation, the location of the registered office, or the effective place of management. International groups frequently underestimate the effective management test. A company incorporated abroad but managed from Spain – through board meetings held in Spain or through a Spanish-based director exercising real control – may be treated as a Spanish tax resident. The consequences are significant: worldwide income becomes subject to Spanish corporate income tax.

Value added tax, payroll taxes, and local taxes on business activity add further layers of compliance. Transfer pricing rules require that related-party transactions be conducted on arm's-length terms and documented in a manner that satisfies AEAT on audit. Spain has adopted the OECD transfer pricing guidelines as the baseline for its domestic rules, and the tax authorities apply them with increasing rigour in cross-border group structures.

Key tax instruments and procedures

The following instruments are most relevant to international business clients operating in or through Spain.

Corporate income tax compliance. Resident companies file an annual corporate income tax return covering the fiscal year. The filing deadline falls within six months and twenty-five days after the close of the fiscal year. Companies must also make advance payments during the year. Missing either deadline triggers automatic surcharges and interest. A common mistake among newly established foreign subsidiaries is to treat the advance payment obligations as optional – they are not, and the penalties compound quickly.

Withholding tax on outbound payments. Spain imposes withholding tax on dividends, interest, royalties, and certain service fees paid to non-residents. The domestic withholding tax rates are substantial. A tax treaty between Spain and the recipient's country of residence may reduce those rates – sometimes to zero for dividends paid to qualifying EU parent companies under the EU Parent-Subsidiary Directive. However, the withholding tax reduction is not automatic. The payer must collect a certificate of tax residency from the recipient and retain documentation on file. AEAT auditors regularly challenge treaty benefits where documentation is incomplete, and the default domestic rate applies retroactively.

Tax treaty network. Spain maintains one of the largest tax treaty networks in the EU. Each treaty allocates taxing rights between Spain and the other contracting state. Treaty provisions on permanent establishment, dividends, interest, and royalties directly determine the tax cost of cross-border structures. Applying the wrong treaty, or applying the right treaty incorrectly, creates liability that is difficult to unwind after the fact. Advance planning – including requests for binding rulings from AEAT where available – reduces this risk.

Transfer pricing documentation. Spanish transfer pricing rules require resident companies that are members of a multinational group to maintain master file and local file documentation. The documentation must be available by the corporate income tax filing deadline. AEAT can impose significant penalties for failure to maintain adequate records, independent of whether the underlying prices are ultimately accepted. Smaller companies meeting specific turnover thresholds have a simplified documentation regime, but the thresholds are applied strictly.

Tax inspections and assessments. AEAT conducts tax inspections through its inspection units. An inspection can cover multiple tax years and multiple taxes simultaneously. The inspection procedure involves formal notifications, information requests, and hearings. A company that fails to respond within the prescribed period loses the ability to present certain defences. Once a final assessment is issued, the company has one month to pay or contest it. Contesting requires filing an alegaciones (submissions) before the economic-administrative courts – specialised administrative tribunals that form part of the Spanish tax dispute resolution system – before judicial review becomes available.

Tax dispute resolution. Spanish tax disputes follow a mandatory administrative phase before reaching the courts. The Tribunal Económico-Administrativo Central (TEAC, the Central Economic-Administrative Court) reviews appeals against AEAT decisions at the national level. TEAC decisions can then be appealed to the Audiencia Nacional (National High Court) and ultimately to the Tribunal Supremo. The full cycle from AEAT assessment to a final Supreme Court judgment takes several years. Businesses must assess at an early stage whether a dispute warrants the full administrative and judicial sequence, or whether a negotiated resolution is more efficient.

For international clients with cross-border structures, the corporate law framework in Spain directly intersects with the tax analysis – particularly on issues of share transfers, group financing, and restructuring.

To receive an expert assessment of your tax exposure in Spain, contact us at info@ferrazwhitmore.com.

Practical insights and common pitfalls

Several risks arise repeatedly in practice. Each is manageable with early attention but costly to address once AEAT has opened a file.

Underestimating the permanent establishment risk. International companies that appoint a Spanish commercial agent, establish a Spanish branch. Alternatively. Allow their Spanish employees to habitually conclude contracts on behalf of the group frequently create a permanent establishment without recognising it. Once AEAT identifies a permanent establishment, it attributes income to that establishment and issues an assessment covering the entire period of its existence – often spanning multiple years. Interest and surcharges are added automatically. Early analysis of whether Spanish activities cross the permanent establishment threshold is essential before any commercial operation begins.

Incorrect withholding tax treatment. Groups that apply reduced treaty rates on outbound dividends or royalties without maintaining adequate documentation face retroactive application of the domestic rate. The burden of proving entitlement to a reduced rate rests on the payer. Many companies discover this only during an audit, at which point gathering historical documentation is difficult and sometimes impossible.

Failure to register for local taxes. Spanish municipalities impose a local business activity tax on companies engaged in economic activities in their territory. Foreign companies establishing a branch or subsidiary frequently overlook this registration obligation. While the tax itself is modest for smaller operators, the failure to register is treated as an infraction and attracts separate penalties.

Misclassifying related-party transactions. Service agreements between a Spanish entity and its foreign parent – for management services, IT support, or licensing – must be priced on arm's-length terms. Where the Spanish entity pays above-market prices to its foreign parent, AEAT may reclassify the excess as a deemed dividend, triggering withholding tax obligations that were not anticipated. The reverse – where the Spanish entity charges below-market prices – can reduce the Spanish taxable base and trigger scrutiny under anti-avoidance rules.

Late restructuring after incorporation. Many international clients seek to restructure their Spanish operations after the initial setup has been completed. Post-incorporation restructurings – converting an SA to an SL, merging subsidiaries, or introducing a holding layer – have tax consequences that require careful sequencing. Spanish tax legislation provides a neutrality regime for corporate reorganisations, but the conditions are specific and the reporting requirements must be met precisely. A reorganisation carried out without regard to these conditions can trigger immediate tax charges at the entity level.

Practitioners in Spain note that AEAT's audit focus has shifted in recent years toward cross-border intragroup transactions, digital business models, and hybrid instruments used in group financing. International groups with Spanish operations that have not recently reviewed their transfer pricing policies and financing structures should treat that review as a priority.

Cross-border and strategic considerations

Spain sits at the intersection of several important cross-border dynamics for international investors.

The Spain–Portugal corridor. Many international groups operate simultaneously in Spain and Portugal, treating the Iberian Peninsula as a single market. The two countries have different tax systems. Portugal's corporate income tax regime differs from Spain's on key points including the territorial exemption for foreign dividends, the treatment of interest deductibility, and the conditions for applying group relief. A holding structure that is tax-efficient in Portugal may not achieve the same outcome in Spain, and vice versa. Groups operating across both jurisdictions benefit from coordinated advice that addresses both systems together. For a detailed view of the Portuguese side of this analysis, our tax law services in Portugal page sets out the key instruments and procedures.

EU parent-subsidiary and interest-royalty regimes. Spain applies EU directives that exempt qualifying intragroup dividends and royalties from withholding tax. The conditions – minimum shareholding thresholds, holding periods, and substance requirements – must be met consistently. Spain has implemented anti-abuse provisions aligned with the EU Anti-Tax Avoidance Directives. Structures that rely on EU directive exemptions must be reviewed against these provisions. Courts in Spain have upheld AEAT challenges to structures that satisfied the formal conditions of a directive but lacked commercial substance.

Tax treaty planning and limitation on benefits. Spain's tax treaties increasingly include limitation on benefits and principal purpose test provisions. These provisions allow AEAT to deny treaty benefits where one of the main purposes of a transaction or arrangement was to obtain a tax advantage. The principal purpose test is applied subjectively, and disputes about its application regularly reach the Tribunal Supremo. Treaty structures designed before these provisions were introduced should be reviewed.

Controlled foreign company rules. Spanish tax legislation includes controlled foreign company rules that require resident companies to include in their taxable base the income of low-taxed foreign subsidiaries in certain circumstances. International groups that use holding or IP structures in low-tax jurisdictions must assess whether those rules apply to their Spanish entities.

Exit taxation. Where a Spanish resident company transfers assets or its tax residence to another jurisdiction, Spanish tax legislation imposes an exit tax on unrealised gains. The rules have been adapted following EU Court of Justice decisions on the compatibility of such rules with EU freedoms. However, exit taxation remains a relevant cost in restructuring scenarios and must be modelled before any decision to migrate a company's tax residence is finalised.

For international groups establishing their Spanish vehicle for the first time. The interaction between tax law and corporate structure is covered in our guide to company formation in Spain. This addresses the incorporation process and its tax implications in detail.

To explore legal options for structuring your business activities in Spain in a tax-efficient manner, schedule a consultation at info@ferrazwhitmore.com.

Self-assessment checklist before engaging tax counsel in Spain

The following checklist helps international clients identify which issues require immediate attention.

Tax residency and permanent establishment exposure. Verify whether your Spanish activities – commercial agents, employees, servers, premises – create a taxable presence. If the analysis is uncertain, a formal review is warranted before AEAT initiates its own inquiry.

Withholding tax documentation. Confirm that tax residency certificates are collected from all non-resident recipients of Spanish-source dividends, interest, and royalties. Confirm that treaty rates, where applied, are supported by current documentation.

Transfer pricing documentation. Confirm that master file and local file documentation is maintained for the current year and is consistent with the positions taken in the corporate income tax returns. Identify any related-party transactions that have not been benchmarked.

Corporate income tax advance payments. Confirm that advance payment obligations have been met on time. If a payment has been missed, calculate the applicable surcharge and interest before the next filing date.

Restructuring plans. If the group plans a reorganisation involving Spanish entities. mergers, demergers, share-for-share exchanges, or transfers of business lines – verify whether the tax neutrality regime applies and whether reporting obligations have been identified.

This approach is most applicable to international businesses that:

  • Have or are establishing a Spanish subsidiary, branch, or agency arrangement
  • Make intragroup payments from Spain to foreign group companies
  • Operate holding or IP structures with a Spanish dimension
  • Are planning a restructuring that affects their Spanish entities
  • Have received or expect to receive a notice of inspection from AEAT

Frequently asked questions

How long does a Spanish tax inspection typically take, and can it be suspended?
A standard AEAT inspection has a legal maximum duration of eighteen months from the formal notification date, extendable in complex cases. The inspection can be suspended in defined circumstances, such as when criminal proceedings are initiated or when the taxpayer requests additional time to respond to information requests. In practice, inspections of international groups frequently approach or exceed the standard duration. Engaging experienced tax counsel from the first notification materially affects how the inspection is managed and its ultimate outcome.
Is a Spanish company always required to withhold tax on dividends paid to its foreign parent?
A common misconception is that dividends paid within an EU group are automatically exempt from withholding tax. Under Spanish tax legislation, the domestic withholding tax rate applies unless the payer affirmatively demonstrates entitlement to a reduced rate under a tax treaty or the EU Parent-Subsidiary Directive. The conditions include minimum shareholding thresholds, holding periods, and, increasingly, substance requirements at the parent level. Failing to collect proper documentation before payment – rather than after – is the most frequent cause of unexpected withholding tax liability.
What is the risk of a Spanish entity being treated as tax resident if its management decisions are taken abroad?
The risk is real and underestimated by many international groups. Engaging a lawyer in Spain with cross-border experience is advisable before a group's governance model is finalised. Spanish tax legislation uses effective management as one of the tests for tax residency. If the board of a foreign-incorporated company holds its meetings in Spain, if its principal executive officer is based in Spain. Alternatively. If its strategic decisions are demonstrably made from Spain, AEAT may assert Spanish tax residency for that company. The Tribunal Supremo has upheld such assessments in a number of cases involving holding companies whose sole function was to hold Spanish assets. The consequence is taxation of the company's worldwide income under Spanish corporate income tax rules.

About Ferraz & Whitmore

Ferraz & Whitmore is an international law firm based in Lisbon, advising business clients on tax law and related matters across 46 jurisdictions. Our tax practice covers Spanish corporate income tax, withholding tax structuring, transfer pricing documentation, tax treaty analysis, and representation before AEAT and the Spanish economic-administrative courts. As a law firm in Spain and Portugal with a dual civil law and common law tradition, we advise international entrepreneurs. Institutional investors. Additionally, in-house legal teams who need coordinated counsel across the Iberian Peninsula and the broader EU. Our attorneys have advised on cross-border tax structuring and tax dispute resolution matters across both civil law and common law systems, and the firm participates in international practice groups focused on EU tax law developments. To discuss how Spanish tax law applies to your structure or to obtain a preliminary review of your tax position in Spain, contact us at info@ferrazwhitmore.com.

Daniel Ferreira Managing Partner

Daniel Ferreira leads our Western European desk. He advises German, French and Dutch corporate groups on cross-border transactions involving Portugal, Spain and the wider EU. His M&A practice spans the manufacturing, technology and consumer sectors, with particular depth in mid-market transactions. Daniel started his career at a top-tier Lisbon firm before moving to a London-based magic-circle firm where he spent four years on cross-border deals. He is the lead author of our Portugal-Germany corporate guides series and has authored over 120 jurisdiction-specific guides.

Disclaimer: This publication is provided for informational purposes only and does not constitute legal advice. The information herein should not be relied upon as a substitute for professional legal counsel tailored to your specific circumstances. Ferraz & Whitmore assumes no liability for actions taken or not taken based on the contents of this material. For advice regarding your particular situation, please contact info@ferrazwhitmore.com.