Stock and Dividend Tax in Spain: 2026 Guide for Investors
How Spanish tax residents pay tax on shares, ETFs and dividends in 2026: 19–30% savings rates, FIFO, the 2-month rule, loss offsets and US withholding.
· 7 min read
Contents
- The 2026 savings base rates
- How a capital gain on shares is calculated
- The 2-month rule (regla de los dos meses)
- Offsetting losses and the 4-year carry-forward
- Dividends and foreign withholding tax
- Worked example for 2026
- ETFs vs Spanish funds: the traspaso
- Brokers abroad and the Modelo 720
- Checklist before you file
- How Signae helps
If you are tax resident in Spain, gains from selling shares and ETFs, plus dividends, go into the base del ahorro (savings base) of your IRPF return. The rates are progressive: 19% on the first €6,000, then 21%, 23%, 27%, and 30% on anything above €300,000. Cost basis follows FIFO, losses offset gains (and partly dividends), and what is left carries forward for four years. Here is how it all works, with numbers.
The 2026 savings base rates
Since 1 January 2025 (Ley 7/2024) the top rate is 30%, up from 28%. The scale is the same across Spain: the state and regional halves are identical, so it does not matter whether you live in Madrid or Málaga.
| Savings base (€) | Rate | Tax on the full band |
|---|---|---|
| 0 – 6,000 | 19% | €1,140 |
| 6,000 – 50,000 | 21% | €9,240 |
| 50,000 – 200,000 | 23% | €34,500 |
| 200,000 – 300,000 | 27% | €27,000 |
| over 300,000 | 30% | — |
These are marginal rates: 30% applies only to the part of the base above €300,000. The same base also holds bank interest and crypto gains (see our guide to crypto tax in Spain).
How a capital gain on shares is calculated
Transmission value and acquisition value
Your gain (ganancia patrimonial) is the sale value minus the purchase value. Broker fees reduce the sale value and increase the purchase value, so they lower your tax. For trades in dollars, both sides are converted to euros at the exchange rate on the date of each trade. That means you can have a gain or loss in euros even if the share price in dollars did not move.
FIFO: the oldest shares are sold first
For identical securities Spanish law requires FIFO: when you sell, you are deemed to sell the shares you bought first. FIFO applies across all your holdings of the same security, even at different brokers. You cannot pick the expensive lots to report a smaller gain.
Example: you buy 10 shares at €100, then 10 more at €150, then sell 10 at €160. Under FIFO you sold the first 10, so the gain is €1,600 − €1,000 = €600, not €100.
The 2-month rule (regla de los dos meses)
You cannot claim a loss on shares right away if you bought identical securities in the two months before or after the sale. The loss is not lost: it is deferred and recognised when you sell the replacement shares. If you only bought back part of the position, the matching share of the loss is deferred.
The two-month window applies to securities traded on regulated markets. For other securities (such as unlisted ones) the window is one year. For non-EU markets such as NYSE and Nasdaq, recent rulings from the Spanish tax authority (DGT) apply the two-month window while the market has a recognised EU equivalence. It is a technical point, so for a large loss on US shares confirm it with your adviser.
The classic mistake: selling a losing position in December to save tax and buying it straight back. That loss will not count this year.
Offsetting losses and the 4-year carry-forward
The savings base has two buckets:
- ganancias y pérdidas patrimoniales: sales of shares, ETFs, funds and crypto;
- rendimientos del capital mobiliario: dividends, interest and coupons.
Gains and losses first net out inside each bucket. If the sales bucket ends negative, you can offset it against dividends and interest, but only up to 25% of their positive total, and the same works the other way. Whatever remains carries forward for four years and is used in the same order. After four years it expires.
Dividends and foreign withholding tax
Dividends are taxed at the same 19–30% scale on the gross amount. Custody and administration fees are deductible; trading commissions are not, because they already sit in the purchase and sale values.
US shares: 15% under the treaty and the W-8BEN
The US withholds 30% on dividends paid to non-residents, but the US–Spain tax treaty cuts that to 15% if you have signed a W-8BEN with your broker. You give the form to the broker, not to the IRS. Without it, reclaiming the extra 15% from the US is slow.
The double-taxation deduction
You can deduct the foreign tax in your Spanish return (deducción por doble imposición internacional). The deduction is the lower of two amounts: the tax actually paid abroad (up to the treaty rate), or the Spanish tax on that income at your average savings-base rate. Since the Spanish rate is never below 19%, the US 15% is usually recovered in full. Anything withheld above the treaty rate, such as 30% without a W-8BEN, is not deductible.
Worked example for 2026
You sold shares with €25,000 of gains and €3,000 of losses (no buy-back), and received €2,000 of US dividends with €300 withheld in the US.
| Step | Amount |
|---|---|
| Net from sales: 25,000 − 3,000 | €22,000 |
| Dividends (gross) | €2,000 |
| Savings base | €24,000 |
| Tax: 6,000 × 19% + 18,000 × 21% | €4,920 |
| Average rate | 20.5% |
| Deduction: lower of €300 and 2,000 × 20.5% = €410 | −€300 |
| Payable in Spain | €4,620 |
Another case: a year with only a €4,000 loss on shares and €2,000 of dividends. You can offset 25% of the dividends, which is €500. Tax is due on €1,500, and €3,500 of loss carries forward for four years.
ETFs vs Spanish funds: the traspaso
Spanish mutual funds (and foreign funds registered with the CNMV) can be switched into another fund tax-free through a traspaso: the gain is taxed only when you finally cash out, and the original date and cost move to the new fund. ETFs do not get this: selling one ETF to buy another is taxed straight away, like selling shares. That is the main tax argument for index funds over ETFs for long-term investors in Spain.
Brokers abroad and the Modelo 720
If your shares sit with a foreign broker (Interactive Brokers, Revolut Securities in Lithuania, Trade Republic and similar), keep two things in mind:
- the broker usually withholds no Spanish tax, so you work everything out yourself in the annual return (the Renta, filed in spring of the following year);
- if your securities abroad are worth more than €50,000 on 31 December, you must file the information return Modelo 720 between 1 January and 31 March. Thresholds and re-filing rules are in our Modelo 720 and 721 guide.
Checklist before you file
- Download statements from every broker for the year, including closed accounts.
- Convert every trade and dividend to euros at the rate on its date.
- Work out cost basis with FIFO per security, across all brokers.
- Check every loss against the 2-month rule.
- Separate sales from dividends and interest, apply the 25% cross-offset and losses from the last four years.
- Find the foreign tax withheld and check your W-8BEN is in place.
- Check whether you need a Modelo 720.
- Hand your numbers and statements to your gestor.
Tax is one side of the picture; to see how your investments are really doing, read how to calculate portfolio return.
How Signae helps
Signae brings your shares (Revolut CSV import, manual trades) and crypto into one portfolio and builds a Spanish tax report:
- sales matched with FIFO across all accounts, in euros at the ECB rate on the trade date, with fees included;
- the 2-month rule: deferred losses are shown separately and released in the year you sell the replacement;
- dividends and interest, the 25% cross-offset and the loss to carry forward;
- an estimate of the tax at the 19–30% scale;
- the value of assets held with foreign intermediaries on 31 December, for the Modelo 720/721;
- a CSV and a PDF in Spanish for your adviser.
Dividends are taken from statements as they are, so the report does not compute the deduction for US tax and says so in a warning. From October to December Signae also suggests which losing positions you could sell to lower this year's tax, and reminds you of the 2-month rule.
The app is in closed beta: request an invite and we will send you a TestFlight or Google Play link.
FAQ
What is the tax rate on stock gains in Spain in 2026?
Gains go into the savings base, taxed at 19% up to €6,000, 21% up to €50,000, 23% up to €200,000, 27% up to €300,000 and 30% above that. The rates are the same in every region.
How does the 2-month rule work in Spain?
If you sell shares at a loss and buy identical shares within two months before or after the sale, the loss is deferred. It is recognised when you sell the replacement shares.
Can I offset stock losses against dividends in Spain?
Yes, but only up to 25% of your positive dividends and interest for the year. Any remaining loss carries forward for four years.
Do I pay Spanish tax on US dividends?
Yes. The US withholds 15% if you have a W-8BEN, and Spain taxes the dividend at 19–30%. The 15% is deducted from your Spanish tax, so you are not taxed twice in most cases.
Is switching between ETFs tax-free in Spain?
No. The tax-free traspaso only applies to mutual funds. Selling an ETF is taxed like selling shares, even if you reinvest in another ETF straight away.
Try Signae
Your exchanges and wallets in one portfolio, a tax report and signals with statistics in one app. Closed beta is open for sign-ups.
Get accessThis article is for information only and is not investment or tax advice.