Selling shares in Spain: FIFO and the two-month rule
A Spanish return matches sold shares to the oldest ones you bought, and refuses a loss if you bought back in too quickly. Both are facts Quantic can show you.
A dividend is self-contained: the year it was paid is the year it belongs to. A sale is not. What a sale cost you is the product of every purchase before it, in years the return is not about — so working out a disposal means folding your whole history, not just the year. Spain matches sold shares to the oldest ones you still held: first in, first out.
There is a second rule that catches people out. If you sell at a loss and buy the same security back within a window — two months for shares on an EU or EEA regulated market, a year for anything else — while still holding the repurchase, the loss cannot be taken in the year of the sale. It is not lost; it attaches to the shares you bought back. Quantic computes how many shares fall inside that window and shows which purchases, on which dates, so the figure can be checked rather than believed.
Where to find it
-
1
Import your buys and sells — a disposal needs the whole history, not just this year's.
-
2
Open the tax report and pick the year.
-
3
Read the disposals section: which shares were matched, what they cost, and any loss the repurchase rule reaches.
The disposals section exists for Spanish residence only. Germany's rules are close but not identical and France uses a weighted average, so neither is offered — silently applying Spanish rules to another country's return would be worse than showing nothing. Two approximations are flagged where they apply: Quantic reads "homogeneous securities" as the same security, which can only under-report the rule's reach, and infers the market from the ISIN's country.
Key terms
- FIFO (first in, first out)
- When you sell part of a holding you bought in several goes, FIFO says you sold the oldest shares first. Most of Europe taxes securities this way, so it decides what those shares cost you and when you acquired them. Quantic carries your holdings at average cost — the better measure of how a position is doing — and uses FIFO only in the tax report, which is why the two can show different figures for the same sale.
- Two-month rule
- A Spanish rule: if you sell at a loss and buy the same security back within two months either side, that loss is not deductible this year. It is not lost — it attaches to the shares you bought back and comes due when you eventually sell those. The window is a year, not two months, for securities not listed in the EU. It exists to stop people booking a loss and immediately buying back in.
- Cost basis (average cost)
- What you actually paid for the shares you hold, per share — the money you put in, including the commission, spread across your shares. Buying more at a different price moves it; selling doesn't, because selling doesn't change what the shares you kept cost you. It's the baseline your gain, your yield on cost and any future tax calculation are measured against.
- Realized result
- What a sale actually came to: what you received for the shares, less the commission, less what those shares had cost you. It's called a result rather than a gain because it is just as often negative — selling below your average cost is an ordinary part of investing, not a mistake to hide. Until you sell, a position's rise or fall is unrealized: real on paper, but nothing has happened yet.
- Proceeds
- The money a sale actually put in your account: the shares times the price, minus your broker's commission. It's the other half of a realized result — proceeds on one side, what those shares cost you on the other. Note the asymmetry with a purchase: a buying commission is added to what the shares cost, a selling one is taken off what you got.
Quantic · Free
See your own year, figure by figure
Import your broker statements and Quantic assembles the year with its provenance — and marks what it could not verify. Free to start, no card.
Need more? Pro adds portfolios, options income tracking & more AI. See Pro →