Where to Declare Share and ETF Sales on Your Tax Return
Practical guide on how and where to correctly declare gains and losses from your share and ETF sales on your Spanish tax return.
If you have sold shares or ETFs during the year, it is essential that you know how to declare them correctly on your tax return. Although it may seem complex, the process follows a clear logic which we explain step by step.
What gains and losses must you declare?
All capital gains and losses arising from the sale of shares and ETFs must be declared on the IRPF (Spanish personal income tax), regardless of whether your bank or broker has already applied a withholding. This withholding is not the final payment of the tax, but an advance payment that will be settled in the tax return.
It is important to bear in mind that only transactions that have been closed during the tax year are declared. If you have shares or ETFs in your portfolio that have risen or fallen in value but you have not sold them, those latent gains or losses are not declared until you complete the transaction.
The key box: Capital gains and losses
Share and ETF sales are declared under capital gains and losses arising from transfers of assets. Specifically, they form part of the savings income tax base, not the general income tax base.
In the tax return form, these transactions are shown in:
- Income from Movable Capital and Capital Gains page
- Specific section on Capital gains and losses arising from transfers
- Subsection dedicated to assets with a generation period of less than or more than one year
Generation period: one year is the boundary
The Spanish tax system differentiates gains and losses according to the time elapsed between purchase and sale:
Generation period of less than one year
If you buy and sell shares or ETFs in less than one year, the gains or losses are declared in the boxes corresponding to short-term transactions. For example, if you bought shares on 15 March and sold them on 10 October of the same year.
Generation period of more than one year
When you hold the investment for more than one year before selling, the gain or loss is declared in the long-term boxes. This distinction is important for the correct completion of the form.
How to calculate capital gain or loss
The basic calculation is as follows:
Gain/Loss = Transfer value - Acquisition value - Expenses
Transfer value
This is the amount you receive from the sale, less commissions and expenses from the sale transaction. If you sell 100 shares at 20 euros each and pay 10 euros in commission, the transfer value would be 1,990 euros.
Acquisition value
This is the price you paid to purchase the shares or ETF, including purchase commissions. If you bought those 100 shares at 15 euros each with 10 euros in commission, the acquisition value would be 1,510 euros.
The result
In this example: 1,990 - 1,510 = 480 euros of capital gain to declare.
AEAT pre-filled data
The Agencia Tributaria (Spanish Tax Agency) receives direct information from Spanish banks and brokers, so many of your transactions will appear pre-filled in the draft tax return. However, there are several aspects you should verify:
- Check that all transactions are included, especially if you trade with several brokers
- Verify that the calculations of gains and losses are correct
- Ensure that the FIFO (First In, First Out) method has been correctly applied in the case of multiple purchases
Foreign brokers: your responsibility increases
If you use a foreign broker, it is likely that the AEAT (Spanish Tax Agency) will not automatically receive information about your transactions. In this case, you must manually declare all transactions yourself, ensuring that you correctly convert the amounts to euros using the exchange rate for each transaction date.
Offsetting gains and losses
One advantage of the system is that you can offset losses against gains in the same tax year. If you sold some shares with 1,000 euros in gains and others with 400 euros in losses, you will only be taxed on 600 euros.
Furthermore, if your losses exceed your gains in a tax year, you can offset that negative balance against capital gains for the following four years. This offset is managed directly in the tax return, carrying forward pending losses from previous years.
Documentation you must keep
It is essential that you keep all documentation related to your transactions:
- Purchase and sale contracts
- Transaction statements
- Proof of commissions and expenses
- Annual tax reports from the broker
- Historical exchange rates (if you trade in foreign currencies)
The AEAT (Spanish Tax Agency) can request this documentation for four years following submission of the tax return.
ETFs: tax particularities
Listed ETFs are treated fiscally like shares in terms of their declaration. However, there is one important aspect: accumulation ETFs (which do not distribute dividends) and distribution ETFs (which do distribute them) have the same treatment at the time of sale, but the latter generate additional income from movable capital which is declared in another section.
Tools that make the process easier
Platforms such as QCapital can help you keep detailed records of your transactions, automatically calculating capital gains and losses. This is especially useful when you make multiple transactions or when you need to apply the FIFO method in complex portfolios.
Common mistakes to avoid
- Not declaring transactions with foreign brokers: all gains must be declared, regardless of where the intermediary is located
- Forgetting to include commissions and expenses: they reduce the gain or increase the loss, affecting taxation
- Confusing generation periods: correctly classify each transaction according to its duration
- Not offsetting losses: taking advantage of this possibility can significantly reduce your tax burden
For any questions about amounts, brackets and rates applicable to the current tax year, always consult the updated information on the Agencia Tributaria's electronic headquarters, as these parameters may be modified each year.
You may be interested in
Content provided for educational and informational purposes only, based on publicly available sources. It does not constitute financial, tax or legal advice, nor a personalised investment recommendation. Before making any decision, consult a qualified and registered financial or tax adviser who can assess your individual circumstances. Tax rules change each year: confirm current figures and rates with the AEAT (Spanish tax authority) or your adviser. This information applies only to residents for tax purposes in Spain.