This article contains affiliate links. If you open an account through our links, we may receive a commission at no extra cost to you. This helps us keep Arfin free.
This article is for informational purposes only and does not constitute tax advice. Consult a qualified tax advisor for your specific situation.
Tax season in Spain runs from April to June, and if you invest through brokers like DEGIRO, Trade Republic, or Interactive Brokers, you already know the feeling: you open Hacienda's draft return (borrador) and your trades are nowhere to be found. Or worse, some data appears but the numbers don't match.
Here's the reality: the Spanish tax authority (Agencia Tributaria) doesn't automatically receive your data from foreign brokers. It's your responsibility to correctly declare every gain, every dividend, and every interest payment. Get it wrong and you might overpay — or underpay, which comes with consequences.
But it doesn't have to be overwhelming. In this guide we'll walk through everything you need to know to declare your broker investments on the Spanish tax return: from understanding the tax brackets to knowing exactly which boxes (casillas) to fill in for each broker.
How Investments Are Taxed in Spain
Before diving into broker-specific details, you need to understand how investment income is taxed in Spain. All investment income falls under the savings base (base del ahorro) of your tax return, which has its own progressive brackets.
Savings Income Tax Brackets (2025)
| Income bracket | Tax rate | |---|---| | Up to 6,000 EUR | 19% | | 6,001 to 50,000 EUR | 21% | | 50,001 to 200,000 EUR | 23% | | 200,001 to 300,000 EUR | 27% | | Over 300,000 EUR | 28% |
These brackets are progressive, meaning you don't pay 21% on everything if you earn 10,000 EUR. You pay 19% on the first 6,000 EUR and 21% on the remaining 4,000 EUR.
Types of Savings Income
Within the savings base, there are two main categories:
- Capital gains and losses (ganancias y perdidas patrimoniales): profits or losses from selling stocks, ETFs, funds, or any other financial asset. The gain is calculated as sale price minus acquisition price (including broker commissions).
- Investment income (rendimientos del capital mobiliario): dividends, interest from savings accounts, and deposit interest.
Offsetting Losses
One of the most important tax advantages is that you can offset losses against gains. If you sold a position at a loss, that loss reduces your taxable base. The rules are:
- Capital losses (from sales) first offset capital gains from the same tax year. Any remaining losses can offset up to 25% of investment income (dividends and interest).
- Negative investment income first offsets other investment income. Any remaining negative amount can offset up to 25% of capital gains.
- Losses you can't offset in one year can be carried forward for the following four years.
Watch out for the anti-avoidance rule: if you sell an asset at a loss and buy the same asset (or a substantially identical one) within two months before or after the sale, you cannot deduct that loss. This is Spain's equivalent of the "wash sale rule." Keep this in mind before doing any tax-loss harvesting.
Savings Base vs General Base
Don't confuse the savings base with the general base (base general). The general base includes your salary, self-employment income, rental income, etc. Investment income always goes into the savings base (with very few exceptions for atypical financial products).
What Exactly You Need to Declare
Let's break down the four main types of investment income you must include in your tax return:
1. Capital Gains and Losses from Asset Sales
Every time you sell a stock, ETF, fund, or any other financial instrument, you must declare the capital gain or loss. To calculate it you need:
- Acquisition price: what you paid for the asset, including broker commissions and any associated purchase costs.
- Sale price: what you received when selling, after deducting broker commissions.
- FIFO method: Spain requires "First In, First Out." If you bought the same asset at different times, when you sell, the oldest shares are considered sold first.
If you trade in currencies other than the euro (for example, US stocks in dollars), you must convert both the purchase price and sale price to euros using the exchange rate on the date of each transaction. This can generate additional exchange rate gains or losses.
2. Dividends
Dividends you receive from your stocks or distributing ETFs are classified as investment income (rendimientos del capital mobiliario). You must declare the gross amount of the dividend in euros.
If the dividend comes from a foreign company, taxes have most likely already been withheld in the country of origin. For example:
- United States: 15% withholding (if you signed the W-8BEN form) or 30% (if you didn't).
- Netherlands (relevant for DEGIRO): 15% withholding.
- Germany (relevant for Trade Republic): 26.375% (Kapitalertragsteuer + Solidaritatszuschlag).
- France: 30% withholding.
These foreign withholdings are deductible on your Spanish tax return (more on this in the common mistakes section).
3. Foreign Withholding on Dividends
As just mentioned, when you receive dividends from foreign companies, the country of origin typically withholds a percentage. Spain has double taxation treaties with most countries, allowing you to deduct that foreign withholding from what you owe in Spain.
The maximum deduction is the lesser of:
- The tax actually paid abroad.
- The result of applying the average Spanish tax rate to that income.
In practice, for most retail investors, you can deduct the full foreign withholding (up to the treaty limit, which is usually 15%). If more than 15% was withheld (as sometimes happens in Germany or France), you can request a refund of the excess from the source country, although the process is complex.
4. Interest from Accounts and Deposits
If you have a savings account (like Trade Republic's) or a fixed-term deposit, the interest earned is investment income and must be declared.
In Trade Republic's case, savings account interest is paid monthly and appears on your annual statement. Germany does not withhold taxes on this interest if you've provided your Spanish tax residency certificate. If you haven't, they may withhold 26.375%, and you'll need to claim a refund.
DEGIRO: Step by Step
DEGIRO is one of the most popular brokers among Spanish investors thanks to its low commissions. It's registered in the Netherlands and regulated by the Dutch AFM. This means your data won't automatically appear on Hacienda's draft tax return.
Step 1: Download the Necessary Reports
Log into your DEGIRO account and go to the Reports section. You'll need to download:
- Annual Report: summarizes all your positions, realized gains and losses, and dividends received during the tax year. This is your primary document.
- Transaction History: details every buy and sell transaction. Useful for verifying the Annual Report's calculations.
- Dividend Report: if available as a separate document, download it too. It details each dividend received, the withholding at source, and the net amount.
Tip: download the reports as soon as they're available (usually in January or February of the following year). Don't wait until the tax filing period starts.
Step 2: Identify Capital Gains and Losses
With the annual report in hand, make a list of all the sell transactions you made during the tax year. For each one you need:
- Purchase date and sale date
- Total acquisition cost (including commissions)
- Total sale proceeds (after commissions)
- Resulting gain or loss
Remember to apply the FIFO method if you purchased the same asset on multiple occasions.
If you traded assets denominated in currencies other than euros (US stocks, for example), you must convert amounts to euros at the ECB exchange rate on the date of each transaction.
Step 3: Fill in the Corresponding Boxes
On the Spanish tax return (Modelo 100), capital gains and losses from asset sales go in boxes 0328 to 0342 (these may vary slightly from year to year — always check the current year's manual).
For each transaction or group of transactions:
- Box 0328: type of asset transferred (listed securities)
- Box 0329: issuing entity (name of the stock or ETF)
- Box 0330: acquisition date
- Box 0331: acquisition value
- Box 0332: sale date
- Box 0333: sale value
- Box 0334: capital gain or loss
For dividends, these go in the investment income boxes, typically box 0029 and following. You must indicate:
- The gross dividend amount
- Foreign withholding tax paid
- Country of origin
Step 4: Apply the Double Taxation Deduction
The withholdings that DEGIRO applied at source (for example, 15% Dutch withholding on Dutch company dividends, or 15% US withholding if you signed the W-8BEN) are declared in the international double taxation deduction section (boxes 0588 and following).
Common Issues with DEGIRO
- Dutch withholdings: DEGIRO, being based in the Netherlands, sometimes withholds Dutch taxes on dividends from non-Dutch companies. Double-check that withholdings are correct.
- Currency conversions: DEGIRO may perform automatic currency conversions. Verify that the euro amounts in your report match the exchange rates on the transaction dates.
- Corporate actions: if there were stock splits, mergers, or other corporate actions, verify that the acquisition price has been adjusted correctly.
- Lack of detail: DEGIRO's annual report may not be as detailed as you need. In that case, use the transaction history to reconstruct each operation.
Trade Republic: Step by Step
Trade Republic is a German broker regulated by BaFin. Its popularity has surged in Spain thanks to its savings account and free savings plans.
Step 1: Access Your Tax Documentation
In the Trade Republic app, go to Profile > Documents. There you'll find:
- Annual Tax Certificate (Jahressteuerbescheinigung): the main document. It includes a summary of all your gains, losses, dividends, and interest for the year.
- Account Statements: showing each movement, including savings account interest payments.
- Dividend Settlement Documents: details of each dividend payment received.
Important note: Trade Republic issues these documents according to German tax regulations. The concepts may not match exactly with Spanish tax categories. You'll need to "translate" the information.
Step 2: Declare Capital Gains and Losses
The process is similar to DEGIRO:
- Identify all sell transactions for the tax year.
- Calculate the gain or loss for each one (sale price - acquisition price, both including commissions).
- Apply the FIFO method.
- Fill in boxes 0328-0334 on Modelo 100.
Trade Republic charges 1 EUR per trade. This euro is part of the acquisition or sale costs, as applicable.
Step 3: Declare Dividends
Dividends received through Trade Republic go in the investment income boxes (box 0029 and following).
German withholding: Germany withholds 26.375% on dividends (25% Kapitalertragsteuer + 5.5% Solidaritatszuschlag on top). However, the double taxation treaty between Spain and Germany limits the withholding to 15%. In practice:
- Trade Republic withholds the full 26.375%.
- On your Spanish return, you can only deduct up to 15% as double taxation relief.
- The difference (the remaining 11.375%) can be reclaimed from the German tax authority via a refund application. It's a slow process (it can take months or even over a year), but it's your money.
Alternatively, if you provided your tax residency certificate to Trade Republic before the dividend payments, the withholding may have already been limited to the 15% treaty rate.
Step 4: Declare Savings Account Interest
This is a point many investors forget. The interest your Trade Republic savings account generates is investment income and must be declared.
- It goes in box 0023 (interest from accounts and deposits) on Modelo 100.
- If Germany didn't withhold tax (because you submitted your tax residency certificate), declare the gross amount and there's no double taxation deduction to apply.
- If Germany did withhold, declare the gross amount and include the withholding as a double taxation deduction.
Common Issues with Trade Republic
- Excessive German withholding: as mentioned, Germany withholds more than the treaty allows. Make sure to reclaim the difference, or better yet, provide your tax residency certificate to Trade Republic so they apply the reduced rate.
- Savings account interest: many people don't declare it because "it's a small amount." But the amount doesn't matter — if you receive interest, you must declare it. Hacienda can cross-reference data with information exchanged between EU countries (CRS — Common Reporting Standard).
- Savings plans (Sparplane): each savings plan execution is a separate purchase for tax purposes. If you later sell, you'll have multiple purchase lots with different dates and prices, and you must apply FIFO.
- Fractional shares: Trade Republic allows fractional share purchases. They're treated the same as whole shares for tax purposes, but be careful tracking the average cost per unit.
Interactive Brokers: Step by Step
Interactive Brokers is the go-to broker for more advanced investors. Its Irish headquarters (for European clients) makes it a foreign broker for all Spanish tax purposes.
Step 1: Generate Your Annual Report
Interactive Brokers offers the most comprehensive tax reports of the three brokers. Go to Performance & Reports > Statements > Activity:
- Annual Statement: the most complete report, covering all trades, dividends, interest, commissions, and currency movements.
- Tax Report: some years IBKR generates specific tax reports. Check if one is available.
- Dividend Report: details of each dividend payment with source withholdings.
Select the full tax year period (January 1 to December 31) and generate the report in PDF or CSV format.
Step 2: Organize Capital Gains and Losses
With IBKR, complexity increases for several reasons:
- Multiple currencies: it's common to trade in EUR, USD, GBP, and other currencies. Each transaction must be converted to euros at the exchange rate on that day.
- Complex products: if you trade options, futures, CFDs, or forex, each product has its own tax rules.
- Margin interest: if you use leverage, the interest paid may be deductible as an investment expense.
For stocks and ETFs (the most common case):
- Download the annual statement.
- Locate the "Realized P&L" section.
- Verify the calculation method matches FIFO (IBKR allows different methods internally, but for Spanish tax purposes you must use FIFO).
- Convert all gains and losses to euros.
Step 3: Declare Dividends
IBKR details each dividend received, including:
- Gross amount in the original currency
- Withholding at source (withholding tax)
- Net amount
You must convert the gross amount to euros and declare it in the corresponding boxes. Source withholdings are deducted as double taxation relief.
Step 4: The Multi-Currency Challenge
This is probably the most complex aspect of filing taxes with Interactive Brokers. When you have a balance in US dollars and convert it to euros (or vice versa), that conversion can generate a capital gain or loss from exchange rate fluctuation.
Similarly, if you buy stocks in dollars and sell them months later, the gain or loss includes two components:
- The change in the stock price.
- The change in the EUR/USD exchange rate between the purchase date and the sale date.
Both components form part of the total capital gain or loss and must be declared together.
Practical tip: use the exchange rate published by the ECB for each date. IBKR may use slightly different rates (their own market rate), but the ECB is the official reference for Hacienda.
Common Issues with Interactive Brokers
- Reports in English: all documentation is in English, which makes translating to Spanish tax concepts more difficult.
- Product complexity: if you trade options or futures, taxation becomes significantly more complex. In these cases, seriously consider hiring a tax advisor.
- Interest on cash balances: IBKR pays interest on uninvested cash. This interest is investment income and must be declared.
- Stock Yield Enhancement Program: if you participate in this program, the payments received are additional income that must be declared.
- Commissions and fees: IBKR has a complex fee structure. Make sure to include all commissions as part of the acquisition or sale price.
Common Mistakes to Avoid
After years of helping investors understand their portfolios, these are the mistakes we see again and again:
1. Not Claiming Double Taxation Relief
This is the most costly mistake. If you receive dividends from foreign companies and taxes were withheld at source, you have the right to deduct that withholding on your Spanish return. Not doing so means paying taxes twice on the same income.
To apply the deduction, you need to:
- Indicate the country of origin of the dividend
- The gross amount
- The withholding paid abroad
- Fill in the double taxation deduction boxes (boxes 0588 and following)
2. Forgetting Exchange Rate Gains
If you bought US stocks when EUR/USD was at 1.20 and sold them when it was at 1.05, you've made an additional exchange rate gain on top of any stock price gain. Many investors only look at the stock price and forget the currency component.
3. Not Correctly Applying the FIFO Method
If you bought 100 shares of Apple at three different times:
- 30 shares at 150 USD in January 2024
- 50 shares at 170 USD in June 2024
- 20 shares at 180 USD in December 2024
And you sell 40 shares in 2025, FIFO dictates that you sell the first 30 (from January 2024) and 10 of the second batch (from June 2024). You cannot choose which ones to sell for tax optimization.
4. Not Filing Modelo 720
If on December 31 you have more than 50,000 EUR in securities held at a foreign broker (DEGIRO, Trade Republic, Interactive Brokers — they all count), you are required to file Modelo 720. Failure to file can result in penalties, although the severity has been reduced following the CJEU ruling of 2022.
5. Confusing FIFO with Weighted Average Cost
In Spain, the official method for stocks and ETFs is FIFO, not weighted average cost. However, for investment fund units (participaciones en fondos de inversion), the weighted average cost method is used. Don't mix up the two methods.
6. Not Declaring Savings Account Interest
With the popularity of savings accounts (Trade Republic, brokers paying interest on cash), many investors forget that this interest is investment income and must be declared, no matter how small the amount.
7. Ignoring the Two-Month Rule
If you sell an asset at a loss and buy the same asset (or a substantially identical one) within two months before or after the sale, you cannot offset that loss. Many investors attempt tax-loss harvesting without considering this rule and run into problems later.
Modelo 720 and Modelo D-6
Modelo 720: Declaration of Assets Abroad
Modelo 720 is an informational declaration (it doesn't involve a payment) that must be filed by Spanish tax residents who hold assets abroad above certain thresholds.
Who must file it:
Any Spanish tax resident who, on December 31, holds abroad:
- Bank accounts with a combined balance exceeding 50,000 EUR
- Securities, rights, insurance, and annuities with a combined value exceeding 50,000 EUR
- Real estate with a combined value exceeding 50,000 EUR
Each of these three categories has its own independent 50,000 EUR threshold. This means you could have 40,000 EUR in a foreign bank account and 45,000 EUR in securities at a foreign broker without being required to file Modelo 720 (because neither category individually exceeds 50,000 EUR).
When to file:
Between January 1 and March 31 of the year following the tax year. That is, for assets held on December 31, 2025, the deadline runs from January to March 2026.
Filing in subsequent years:
You only need to re-file Modelo 720 if the value in any category has increased by more than 20,000 EUR compared to the last declaration filed.
Penalties:
Following the Court of Justice of the EU ruling in January 2022, Spain had to reform its penalty regime. The disproportionate penalties (fines of 5,000 EUR per undeclared data item) were eliminated. Now the general penalties under the General Tax Law apply, which are much more moderate. However, filing remains mandatory.
Which brokers count as "foreign":
- DEGIRO: yes, it's in the Netherlands.
- Trade Republic: yes, it's in Germany.
- Interactive Brokers: yes, it's in Ireland (for European clients).
- Scalable Capital: yes, it's in Germany.
- Spanish brokers (like Renta 4 or Self Bank/MyInvestor): no, they don't count as foreign.
Modelo D-6: Declaration of Spanish-Resident Investments in Foreign Securities
Modelo D-6 is another informational declaration, but this one is filed with the Ministry of Economy (not with Hacienda). It's mandatory for Spanish residents who hold securities traded on foreign markets, deposited at entities located outside Spain.
Deadline: during the month of January of the following year.
Who must file it: any resident with foreign securities, with no minimum threshold. That means if you have even a single share at DEGIRO, you technically should file it.
In practice, this obligation is less well-known and compliance is more lax, but it's important to know it exists.
Tools That Make Your Life Easier
Declaring investment income doesn't have to be a nightmare. There are tools that can help enormously:
TaxDown
TaxDown is a Spanish tax filing platform that guides investors step by step. Their investor plan includes:
- Importing data from brokers
- Automatic calculation of gains and losses
- Application of double taxation deductions
- Review by tax experts
It's especially useful if you don't want to deal with the boxes one by one. The platform asks you questions in plain language and fills in the return for you.
Specialized Tax Advisors
If your situation is complex (you trade options, have accounts in many countries, do frequent trading), it may be worth hiring a tax advisor specializing in investments. The typical cost is between 150 and 500 EUR depending on complexity, but it can save you much more in errors and penalties.
Look for advisors who:
- Have experience with international brokers
- Know double taxation treaties
- Understand products like ETFs, options, and crypto
Arfin for Cost Basis Tracking
One of the biggest difficulties when filing is knowing exactly how much you paid for each position and when you bought it. This gets complicated when:
- You make multiple purchases of the same asset over time
- You have savings plans buying every week or month
- You trade in multiple currencies
- You use multiple brokers
Arfin helps you maintain a consolidated record of all your positions, with:
- Detailed cost basis for each position, applying FIFO
- Complete transaction history imported from DEGIRO and Trade Republic
- Dividends received with withholding details
- Multi-broker view so you know exactly how much you hold at each broker (useful for Modelo 720)
It doesn't replace a tax advisor or a filing tool like TaxDown, but it's the perfect complement for keeping your data organized year-round — not just in April.
Conclusion: Prepare Year-Round, Not in April
The best advice we can give you is this: don't wait until the tax filing period to organize your tax data. If you accumulate the information throughout the year, the filing process becomes much simpler.
Here's an action plan:
- Right now: download the annual reports from your brokers if you haven't already.
- Throughout the year: record your transactions in a tool like Arfin to keep your cost basis always up to date.
- In January-March: file Modelo 720 and Modelo D-6 if they apply to you.
- In April-June: file your income tax return with all the information organized.
If you want to simplify the process, TaxDown is an excellent option for the filing itself, and Arfin helps you stay on top of your portfolio all year long.
Try TaxDown for your tax return | Sign up for Arfin to track your portfolio
Remember: this article is for guidance only and does not replace professional tax advice. Tax regulations change frequently, and your personal situation may require specific treatment. Always consult a qualified tax advisor.