Skip to content
Calculadora Capital

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.

Net gain (after tax)
€3,528.00
Tax due
€1,372.00

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?
The autonomous rate is 28% on the gain (the difference between the sale and the purchase, less costs). Alternatively, you can opt for aggregation and be taxed at the progressive IRS rates, which usually pays off when your marginal rate is below 28%.
How do I calculate the capital gain on a share or ETF?
Gain = sale value − purchase value − costs (commissions and stamp duty). If the result is positive, it is a taxable gain; if it is negative, it is a capital loss and there is no tax to pay.
Do I pay tax if I sell at a loss?
No. A capital loss generates no tax. On the contrary, it can be used to reduce the tax on other gains of the same type realised in the same year and, if you opt for aggregation, carried forward for five years.
Must I always pay 28%, or can I aggregate?
You can choose. Aggregation (adding the gain to your other income and applying the progressive rates) is optional and usually pays off for lower incomes. It is mandatory in one case: assets held for less than 365 days when your taxable income reaches the top IRS bracket.
Where do I report capital gains on shares for IRS?
In Anexo G of the Modelo 3 IRS return, stating the dates and the acquisition and disposal values of each security. The buy and sell costs are also declared, since they reduce the taxable gain.

Related calculators & reading

Sources

Author: Thorben Rasmus Idel · Reviewed by: Nahar Geva · Last reviewed: 2026-05-31