Sextante

Advanced taxation of funds in Spain

That mutual funds let you transfer tax-free is only the start. Handling the taxation of a fund portfolio well over decades makes a huge difference to what you ultimately pay the tax authority. These are the rules that really move the needle.

The transfer deferral, used well

The transfer (article 94 of the Income Tax Act) moves your money from one fund to another without realising the gain for tax: the tax is deferred until the final redemption. The keys to not breaking it:

  • The money can't pass through your account: the institution handles it fund-to-fund.
  • It also works when changing distributor (from one bank to another broker): it's a transfer, not a sale. You keep the holding age and cost basis.
  • It applies only to mutual funds (and pension plans among themselves). Not to ETFs or shares.

The deferral is valuable because the money you don't pay in tax keeps compounding for you, year after year.

The FIFO rule: it decides how much you pay on partial sales

When you hold units of the same fund (same ISIN) bought on different dates and sell only part, the tax authority applies FIFO (First In, First Out): the oldest units are sold first. You can't choose to sell the higher-cost ones to reduce the gain.

Consequence: the old units are usually the lowest purchase price and therefore the largest gain. Selling "a little" of an old fund can surface more gain than you expected.

Planning trick: if you want flexibility over which lot you sell, hold the same asset in different funds (different managers or ISINs). FIFO applies within each ISIN, so with several "envelopes" you choose which one to draw from.

Tax-loss harvesting: realising losses on purpose

If in a given year you're sitting on realised gains, you can sell another position that's at a loss to offset them and cut the bill. Recall how offsetting in the savings base works: capital losses subtract from gains in the same group, the surplus offsets up to 25 % of the other group, and what's left carries forward 4 years.

The repurchase rule: the mistake that voids your loss

Here's the trap that wrecks many harvesting trades. If you sell at a loss and rebuy homogeneous securities within a window, the tax authority won't let you count that loss until you dispose of the repurchased ones:

  • Listed securities (shares, ETFs): a 2-month window before or after.
  • Unlisted (fund units): a 1-year window before or after.

In other words: with a fund, selling at a loss and rebuying the same fund a week later does not count for offsetting. To realise the loss cleanly, transfer or reinvest into a different fund (another index or manager) that isn't "homogeneous".

Accumulating vs. distributing

An accumulating fund reinvests dividends internally: it doesn't pay them out, so you don't pay tax on them until you sell. A distributing one pays them out and they're taxed each year as investment income. To build wealth over the long run, the accumulating class defers that tax and is almost always more efficient.

Common mistakes

  • Selling instead of transferring. Switching funds by selling and rebuying pays the gain today; the transfer defers it. Unless you want to surface the gain on purpose, transfer.
  • Forgetting FIFO when planning a partial sale. Compute with the old units, not the latest ones you bought.
  • Harvesting and rebuying the same fund. You void the loss via the repurchase rule.
  • Concentrating everything in a single ISIN. You lose the flexibility to choose lots and to harvest without tripping the repurchase rule.

What to do

Use transfers to move and rebalance toll-free; reserve sales for when you actually want to take money out or surface results in a planned way. In December, cross your gains and losses for the year to decide whether to realise a latent loss, and if you do, reinvest into a different fund to dodge the repurchase rule. And when selling in chunks, spread the sale across tax years to avoid climbing brackets in the savings base.


Educational information, not tax advice. The rules are complex and can change; check with the AEAT or an adviser for your case.

Related calculators