Capital Gains Tax Calculator
Sold shares, ETFs or funds at a profit? Work out the capital gain and the IRS tax due: the autonomous rate is 28% on the gain. Enter the purchase value, the sale value and your costs to see, in seconds, how much you keep after tax.
The autonomous rate on securities capital gains is 28%. If you opt for aggregation (englobamento), replace it with your marginal IRS rate. Costs are the buy/sell commissions and stamp duty.
How the tax is reached
| Sale value | €15,000.00 |
| − Purchase value | €10,000.00 |
| − Costs (commissions, stamp duty) | €100.00 |
| Capital gain | €4,900.00 |
| Tax (28%) | −€1,372.00 |
| Net amount you receive | €13,528.00 |
Educational estimate, not financial advice. Covers capital gains on shares, ETFs and funds (securities); it does not cover property or the balance with other losses.
Video: how to use the calculator
What securities capital gains are
A capital gain is the profit you make when you sell an asset for more than you paid for it. For securities (shares, ETFs, investment funds, bonds or crypto-assets), the gain is the difference between the sale value and the purchase value, less the costs directly tied to the transaction (broker commissions and stamp duty). It is Category G income for IRS (Portuguese income tax).
How the tax is calculated
The gain is taxed by default at an autonomous (flat) rate of 28%. Put simply: tax = gain × 28%. Alternatively, you can opt for aggregation (englobamento): adding the gain to your other income and being taxed at the progressive IRS rates. That is worth it when your marginal rate is below 28%. The calculator lets you replace the 28% with your own rate, so you can compare both scenarios.
Losses and the yearly balance
If you sell at a loss, you have a capital loss and there is no tax to pay. What counts for IRS is the yearly balance: gains minus losses of the same type. A loss can reduce the tax on other gains in the same year and, if you opt for aggregation, be carried forward for five years. Capital gains are reported in Anexo G of the Modelo 3 IRS return.
Worked example
You bought shares for €10,000 and sold them for €15,000, with €100 in commissions and stamp duty. The gain is €4,900 (15,000 − 10,000 − 100). At 28%, the tax is €1,372, so the net gain is €3,528 and you receive €13,528 in total after the sale. If your marginal IRS rate is below 28%, aggregation may reduce this tax.
Frequently asked questions
What is the capital gains tax rate on shares in Portugal?
How do I calculate the capital gain on a share or ETF?
Do I pay tax if I sell at a loss?
Must I always pay 28%, or can I aggregate?
Where do I report capital gains on shares for IRS?
Related calculators & reading
Sources
- Artigo 10.º do Código do IRS: Mais-valias — Autoridade Tributária e Aduaneira / Portal das Finanças
- Artigo 43.º do Código do IRS: Mais-valias (saldo entre mais e menos-valias) — Autoridade Tributária e Aduaneira / Portal das Finanças
- Artigo 72.º do Código do IRS: Taxas especiais (28%) — Autoridade Tributária e Aduaneira / Portal das Finanças
Author: Thorben Rasmus Idel · Reviewed by: Nahar Geva · Last reviewed: 2026-05-31