Shares and ETF tax calculator

Estimate the IRS on the shares and ETFs you sold in Portugal, sale by sale, and see whether the 28% rate or aggregating with your income leaves less tax to pay.

Sales in the year

One line per sale, each from its own acquisition. Add a line for a loss as well.

Sale 1
days

Days between the acquisition of the lot sold and the sale. With several lots, FIFO takes the oldest first, and each lot keeps its own date.

€

Commission and other costs of the sale. Account maintenance fees and platform subscriptions are usually not accepted.

€

What you paid for the lot, with the purchase commission already in it (art. 48(1)(a) and art. 51(1)(b) of the CIRS).

€

What the sale brought in, before the commission of the sale.

Sale 2
days
€
€
€
Sale 3
days
€
€
€
Sale 4
days
€
€
€
Your other income
€

Your other income subject to IRS in 2026, net of the specific deductions and before deductions from tax: salary, pensions, rents, business income. Enter 0 if there was none.

€

Negative balances of earlier years, which only a taxpayer who aggregates can deduct (art. 55(1)(d) of the CIRS), within five years.

Splits the income in two, as joint taxation does. Leave it off for an individual return.

Broker

The broker reports the sales to the Tax Authority, and you declare them in Anexo G of the return for 2026.

Tax to set aside, paid with the return by August 31, 2027
€229.86
Route that pays less
Aggregated with your income
At the 28% autonomous rate
€354.59
Aggregated with your income, at the general rates
€229.86
Taxable balance
€1,266.40
Gains added
€1,877.00
Losses deducted
€404.00
Excluded by the holding period
€206.60
Commissions and costs
€27.00
Rate over the taxable balance
18.2%
Withheld at source
€0.00

Aggregating costs €124.73 less than the 28%.

How the taxable amount is built

SaleGainExcludedTaxed
1. ETF or open-ended fund, 900 days (10% excluded)€1,490.00€149.00€1,341.00
2. Listed shares, 200 days (0% excluded)€195.00€0.00€195.00
3. ETF or open-ended fund, 3000 days (30% excluded)€192.00€57.60€134.40
4. Listed shares, 400 days (0% excluded)-€404.00-€0.00-€404.00

Declare it in Anexo G, quadro 9 of the return for 2026.

Nothing is withheld on these sales. The tax is settled with the annual return and paid by 31 August of the following year (art. 97(1)(a) of the CIRS), so keep the amount aside.

Estimate for 2026 income with the 28% of art. 72(1)(c) and the exclusions of art. 43(5) of the CIRS, the general rates and the solidarity surcharge for the aggregation. The Tax Authority's assessment is the one that counts.

Tax to set aside, paid with the return by August 31, 2027: €229.86

Worked example

€1,877 of gains and €404 of losses in the year leave a balance of €1,473. The holding period leaves €207 out of tax and the €27 of commissions and sale costs are already inside each gain, so €1,266 are taxed. At the 28% that is €355; added to other income of €12,000 it is €230, so Aggregation pays less.

  • Gains added

    €1,877

  • Losses deducted

    €404

  • Gain

    €1,473

  • Gain of a sale

    €1,473

  • Excluded by the holding period

    €207

  • Taxable balance

    €1,266

  • At the 28% autonomous rate

    €355

  • Aggregated with your income, at the general rates

    €230

  • Route that pays less

    Aggregation

The tax is settled with the return for 2026 and paid by August 31, 2027, with nothing withheld at source.

How the estimate works

Balance
A sale of shares or of ETF units is a capital gain of category G (art. 10(1)(b) of the CIRS). The year's amount is the balance of the gains less the losses of the same year (art. 43(1)).
Holding-period exclusion
For securities admitted to trading and for units of open investment funds, 10% of a sale's gain goes untaxed when the assets were held more than 2 and less than 5 years, 20% from 5 to less than 8 years and 30% from 8 years (art. 43(5), added by Lei n.º 31/2024). The exclusion follows each sale, on a gain or on a loss.
Commissions and costs
Commissions and other costs necessary to buy and to sell are added to the acquisition value of each operation (art. 51(1)(b)), so they come off that sale's gain. Account maintenance fees and platform subscriptions are not costs of the operation.
The 28%
A positive balance is taxed at the autonomous rate of 28% (art. 72(1)(c)). It is not withheld at source: it is settled with the annual return.
Aggregation
You may instead aggregate the balance with the rest of your income (art. 72(13)), and then every gain of category G of the year comes in too, and pay the general rates of art. 68 plus the solidarity surcharge of art. 68-A. The estimate shows the IRS with the balance less the IRS without it: the extra tax the gain causes.
Compulsory aggregation
Aggregation is compulsory for the balance coming from assets held less than 365 days when your taxable income including it reaches the last bracket of the general rates: €86,634 for 2026 (art. 72(14)). The rest stays at 28%.
Losses
A negative balance pays no tax. It can be carried forward five years only when you opt, or are obliged, to aggregate (art. 55(1)(d)); otherwise the loss dies with the year. For the same reason, a loss you bring from an earlier year only counts in the aggregation.
Solidarity surcharge
The solidarity surcharge adds 2.5% to the part of the taxable income between 80 000 and 250 000 and 5% above that (art. 68-A). It only matters for the aggregation, and only from 80 000 of income.
Minimum existence
The minimum existence of art. 70 lowers the tax of those whose income comes mostly from work or pensions. It never reaches income taxed at the autonomous rate, and it is not modelled here: aggregating a low income is already cheaper because the first brackets are below 28%.

What is covered

Covered
Individuals who are Portuguese tax residents, selling listed shares or units of open investment funds held as a private asset, in 2026.
Not supported
Unlisted shareholdings, where only half of the balance counts (art. 43(3)); the monetary correction of art. 50; foreign-currency conversion; the credit for tax paid abroad; the assets of art. 10(1)(k), with their own regime since 2023; dividends and other distributions; direct redemptions with a fund; non-residents; and the reduced rates of the Azores and Madeira.

Assumptions

What is not modelled
Days are counted in years of 365 days; a lot close to the 2, 5 or 8-year threshold is better compared by calendar years. Joint taxation splits the income in two, and the compulsory test compares the income you enter with the last bracket.
Educational estimate
This is an educational estimate, not tax advice. The Tax Authority's assessment is the one that counts.
Where to declare
Sales held at a Portuguese broker go in Anexo G, quadro 9, of the return; sales held abroad go in Anexo J, quadro 9.2A, with the country of the counterparty. The option for aggregation is marked in quadro 15 of Anexo G or 9.2C of Anexo J.

Sources

Rules and rates for 2026 income reviewed on December 1, 2026.

This calculator is for illustrative purposes only and does not constitute financial, investment, or tax advice. Figures shown are estimates — consult a qualified financial advisor before making financial decisions.

Free and open source. Use it here or host your own.