Skip to content
finkavo.
Back to toolsBROKER CAPITAL GAINS · CAT G / J

Broker capital gains calculator (FIFO)

Paste your broker's transaction export — get FIFO-matched realized capital gains for Anexo G/G1 and foreign dividend/interest totals for Anexo J. Nothing is uploaded — parsing runs entirely in your browser.

Your transaction data never leaves your browser — parsing happens locally, nothing is sent to our servers.
IMPORT

Frequently asked questions

How are capital gains calculated for foreign brokerage accounts?

Portugal uses FIFO (first-in, first-out) as the default cost-basis method under CIRS Art 48-51: the oldest shares you bought are treated as the ones you sold first. This calculator applies FIFO per instrument, matching each sale against your earliest open buy lots to compute the realized gain.

Do I need to declare foreign brokerage gains even if the broker doesn't withhold Portuguese tax?

Yes. Portuguese tax residents must declare worldwide capital gains and investment income on Modelo 3, regardless of where the broker is based or what tax (if any) it withholds. Realized gains go on Anexo G/G1; foreign dividends and interest go on Anexo J.

Which brokers does this calculator support?

Revolut and Interactive Brokers have dedicated parsers that recognise their CSV export formats automatically. For any other broker, use the manual column-mapping option — you tell the calculator which column holds the date, transaction type, quantity, price, and so on, and it parses your export the same way.

What happens if I sold shares that don't appear in my imported buy history?

The calculator flags these as unmatched sales rather than guessing a cost basis of zero. This typically happens when shares were transferred in from another account, or when your CSV export doesn't cover the full history — you'll need the missing buy transaction's date and price to complete that lot's cost basis manually.

How is the EUR conversion done for foreign-currency transactions?

Each transaction row is converted using the FX rate found in that same row of your broker's export (the trade-date rate), not a single blanket exchange rate. If your broker's export doesn't include an FX rate column, the calculator falls back to 1:1 — verify EUR-equivalent amounts against your broker's own statements when this happens.

Is my transaction data uploaded anywhere?

No. All CSV parsing, FIFO matching, and aggregation happen entirely in your browser using JavaScript — the pasted or uploaded file is never sent to Finkavo's servers. This is the same trust model as our other planning calculators.

Broker capital gains calculator for Portugal (FIFO, Anexo G/J) · Finkavo