Capital gains and losses are changes in a taxpayer’s assets resulting from alterations in their composition (sale of real estate, stocks, cryptocurrencies, etc.), as long as they are not income from work, capital, or economic activities.
Conditions for their existence:
- Change in the composition of assets (sale, donation, exchange…).
- Variation in asset value.
- The law does not provide for an exemption or they are not otherwise tax-exempt.
Some of the most common examples include the sale of real estate or stocks, transfer or exchange of cryptocurrencies, and prizes, compensations, and/or insurance payments.
On the other hand, the following are not considered capital gains or losses: inheritances or donations (they are taxed under the Inheritance and Donations Tax), contributions to protected assets, or dissolution of marital regimes or allocations due to separation/divorce.
There are also exempt gains, such as the sale of a primary residence by individuals over 65 or dependents, or reinvestment in another primary residence (under certain requirements), among others.
The calculation is as follows:
Gain/Loss = Transfer Value – Acquisition Value
- Acquisition Value: price paid + associated expenses (notary fees, non-deductible taxes, commissions).
- Transfer Value: actual amount received – expenses and taxes incurred.
As a general rule, these capital gains/losses are taxed in the savings base, except for losses that do not come from transfers, which are taxed in the general base.
Other asset variations that may cause doubts but are also considered capital gains include:
- Prizes from contests, raffles, or games that are not exempt.
- Bank bonuses (for payroll direct deposit, self-employed contributions, etc.).
What documentation is needed to report these gains/losses in my income tax return?
If the gains or losses come from shares or equity in Spanish entities, the tax authorities usually already have all the relevant information, which is included in your tax data. However, each entity usually issues an annual report summarizing this information.
For income from foreign entities, it is necessary to obtain this annual report, as the Spanish Tax Agency does not automatically have this information (although later it may communicate with the tax authorities of those countries if an information exchange agreement exists). Some examples of relevant reports from brokers or foreign entities may include the following:
Revolut:

Interactive Brokers:
Degiro:
Etoro:

If it concerns the purchase and sale of real estate, the necessary documents to calculate whether there has been a gain or loss are as follows:
- Purchase or acquisition deed (inheritance, donation)
- Purchase or acquisition expenses (notary, management fees, taxes paid, etc.)
- Sale deed or information about the sale date and the amount agreed upon in the sale
- Transfer or sale expenses (real estate agency fees, notary, management fees, taxes paid, etc.)