Which losses offset share or fund gains, the 25% cap against dividends and interest, the four-year carry-forward, and when a repurchase defers the loss.
The ideas in this guide are there to explain how losses are offset on Renta and what the two-month rule does. With Aitax you upload the documents: the AI takes care of the heavy lifting. You check that the figures are right. If a question comes up, you ask the specialised AI, trained on the law as it stands.
Yes: a loss on shares fully offsets a gain on funds, and only partly offsets dividends or interest. On Spanish income tax (Renta / Modelo 100), sales sit in one basket and receipts — dividends, interest — in another. Inside the sales basket there is no cap: a loss on a share reduces a gain on a fund or an ETF (exchange-traded fund). Against a dividend, the law lets you offset at most 25%. What does not fit is carried forward for four years. And if you sell at a loss and buy the same security back too soon, that loss does not enter this year: it is deferred.
Updated 10 October 2026. Sources: Spanish Personal Income Tax Act (LIRPF, Ley del Impuesto sobre la Renta de las Personas Físicas), articles 33.5, 48 and 49 (Boletín Oficial del Estado, Spain’s official gazette), and the AEAT manual (Agencia Estatal de Administración Tributaria, Spain’s tax agency) on the savings base. Article 49 is the one for shares, funds, dividends and interest. Article 48 applies the same 25% and four-year idea to the general base — salary and income that does not come from a sale.
Sales of shares, funds and ETFs are subtracted from one another, with no cap. Example: you sell shares at a €3,000 loss and a fund at a €4,000 gain. You are left with €1,000 of gain. It does not matter that one holding sits at one broker and the other at another: Hacienda looks at the whole year.
Dividends and interest sit apart: they are not a sale. A loss on a sale can reduce those receipts by only a part, 25%. A dividend is not “offset” against interest: they are added together. If you receive €4,000 of dividends and €200 of interest, Hacienda looks at €4,200.
If you hold the same security at several brokers, the purchase order is Hacienda’s, not the one on a single statement. How it orders the purchases.
| You have a loss from… | Can you subtract it from…? | How much |
|---|---|---|
| Selling shares | A gain from selling funds or ETFs | The whole loss |
| Selling funds | A gain from selling shares | The whole loss |
| Selling shares, funds or ETFs | Dividends | Only 25% of those dividends |
| Selling shares, funds or ETFs | Interest | Only 25% of that interest |
Same €3,000 loss on shares and €4,000 of dividends, no other sales. 25% of 4,000 is €1,000. That slice reduces the dividends. €2,000 of loss remains for the next four years. If there was interest as well, the 25% is worked out on dividends plus interest, not on each receipt on its own.
If a year your interest comes out negative and you have gains from sales, that interest also reduces those gains, by at most 25%. It does not matter whether the loss is from this year or an earlier one: together they cannot reduce those receipts by more than 25%.
What you do not use is not gone for good. It is carried forward four years, in the same order: first a sale against a sale (or a receipt against a receipt) and, if anything is left, against the other at 25%. Each year you must use as much as will fit. You cannot save a loss for later if this year has something to subtract it from, or mix it with newer losses to stretch the deadline.
In practice, 2021 losses can still be used in 2025; 2022 losses, until 2026. After the fourth year, the remainder expires.
Selling at a loss and buying the same security back soon afterwards does not wipe the loss: it defers it. The law does not count it while you still hold the same share or the same fund unit. It comes in when you truly sell them.
The window depends on whether the security is listed:
The window looks both ways: a purchase two weeks before the sale counts the same as a purchase two weeks after. Declaring that loss as if it were usable this year is a common mistake. What happens if you report share sales wrongly.
With few movements and a lot of time you can still do it by hand. With many — several brokers, several years, a buyback at the wrong time — rebuilding every movement and applying these rules stops being realistic.
Aitax reads the statements. It rebuilds the full history: sales, dividends and interest. It calculates the offsets and flags losses a repurchase puts on hold. You review the result and file it on the AEAT site.
Can I offset share losses against fund gains?
Yes, in full. Both are sales. The 25% cap does not apply between a share and a fund.
Can I offset share losses against dividends?
Only up to 25% of those dividends. If you also received interest, Hacienda adds the two figures and the 25% is worked out on that sum. The rest is carried forward four years.
Can I offset losses from earlier years?
Yes, for four years. First they come off the same kind of amount (a sales loss, off another sales gain). If anything is left, off dividends or interest, only 25%. Each year you must use as much as will fit.
What if I sell at a loss and buy the same security a few days later?
The loss is deferred until you sell the holdings you still have. For listed securities the window is two months either side of the sale; for unlisted ones, one year.
Is the loss lost if I buy back, or only deferred?
Only deferred. It is not a penalty or a fine. When you sell that same share or that same fund unit, the loss comes in.
You download the statements, drop them into Aitax, review the sales, the offsets and the deferred losses, and download the document for Hacienda in minutes.
Upload your broker reports and Aitax prepares your Renta.