# How much tax do you pay when you sell?

> What you pay in Spain when you sell shares, ETFs, funds or crypto, bracket by bracket, and what you keep. Free, runs in your browser and stores nothing.

Canonical: https://www.lait.finance/capital-gains-calculator

In Spain, the gain on selling shares, ETFs, funds or crypto is taxed as savings income, from 19% to 30% by bracket. For anyone paying income tax in Spain. Enter what it cost and what you get for shares, ETFs, funds or crypto, and see the tax on that sale, bracket by bracket, with the 2026 rules. It runs in your browser and nothing is stored.

## How the gain is worked out

The gain is what you receive minus what it cost you. Fees add to the cost and come off the sale. If you bought the same asset several times, Spain treats the first ones bought as the first ones sold, whatever your average cost says.

## The savings scale in 2026

Gains, dividends and interest are added up in the savings base, and each part pays the rate of its bracket. The scale is the same in every region of the common territory.
- €0 to €6,000: 19%
- €6,000 to €50,000: 21%
- €50,000 to €200,000: 23%
- €200,000 to €300,000: 27%
- Over €300,000: 30%

## If you sell at a loss

A loss offsets other gains of the same year first. What is left can offset up to 25% of your dividends and interest, and the rest carries forward 4 years. To use it you have to declare it, even if there is nothing to pay.

## Crypto, funds and ETFs

Swapping one cryptocurrency for another counts as a sale at its value in euros at that moment. A transfer between investment funds, with no money reaching your account, is not taxed until you redeem. Moving from one ETF to another is a sale.

## Frequently asked questions

### When do I pay it?

In the income tax return for the year of the sale, filed in spring of the following year. When you redeem a fund, 19% of the gain is withheld at that moment and comes off that return.

### Is there an amount that is tax free?

As a rule, no: the gain enters the savings base from the first euro. The exceptions are narrow, such as people over 65 who put the proceeds into a life annuity.

### Does it work for selling a flat?

As an order of magnitude. The gain also enters the savings base, but the sum has more pieces: purchase and sale costs, depreciation if it was rented out and the exemption for reinvesting in your main home.

### Is my data stored?

No. The sum runs in your browser: nothing is sent to a server and nothing is saved on your device.

## This sum, from your real sales

Lait keeps your purchases and sales and works out each gain lot by lot, with the losses you can offset. The tax view is part of Premium.
[Home](https://www.lait.finance/welcome). No card to start.

## Related

- [Net worth calculator](https://www.lait.finance/net-worth-calculator)
- [Esta página en español](https://www.lait.finance/capital-gains-calculator/es)
- [The whole site for a language model](https://www.lait.finance/llms.txt)
