Tracking a stock portfolio against a live market chart
PORTFOLIOTRACKR
Tax & Reporting

How to Generate a Capital Gains Tax Report for Your Stock Portfolio (2026)

By Daniel Hartley · March 28, 2026 · 6 min read

Tax time doesn't have to mean digging through brokerage PDFs and building spreadsheets. PortfolioTrackr's built-in capital gains report does the FIFO maths for you, every realised trade, every lot, every gain and loss, by tax year, in seconds.

Tax time doesn't have to mean digging through brokerage PDFs and building spreadsheets. PortfolioTrackr's built-in capital gains report does the FIFO maths for you, every realised trade, every lot, every gain and loss, by tax year, in seconds.

What capital gains tax is and why it matters for investors

When you sell a stock or crypto for more than you paid for it, the profit is a capital gain and is generally subject to tax. When you sell for less, it's a capital loss, which can often offset gains and reduce your overall tax bill. The exact rules depend on your country, but almost every tax authority requires you to report realised gains and losses for the year.

The tricky part is that the "cost" of the shares you sold depends on which lot you bought. If you bought 100 AAPL at $150 in January and another 50 at $175 in March, and then sold 80 shares in December, which shares did you sell? The answer matters, because the gain calculation is different for each lot. This is where the FIFO method comes in.

How PortfolioTrackr calculates gains: FIFO explained

FIFO stands for First In, First Out. It's the standard calculation method and means that when you sell, the oldest shares you bought are treated as sold first. Using the example above: you sell 80 shares, so PortfolioTrackr matches 80 of them against your January lot (100 shares at $150). The gain is calculated as (sale price × 80) minus ($150 × 80). The remaining 20 January shares and all 50 March shares stay in your queue for future sales.

PortfolioTrackr runs this calculation automatically across your entire trade history, covering partial lots, multiple buy dates, DCA (dollar-cost averaging) positions, and positions where you've bought and sold multiple times over the years.

How to open the Capital Gains Report

  1. Open your dashboard and click the GAINS REPORT button in the action bar above your positions table.
  2. The report opens showing all realised trades for the current year by default.
  3. Use the Tax Year filter to switch between years, useful for filing previous years or comparing performance across periods.
  4. Switch between a single portfolio or All Portfolios to see a combined view of your entire trading activity.

What the report shows

For each realised lot the report shows the ticker, the date you bought those shares, the date you sold, the number of shares, the cost basis (what you paid), the sale proceeds (what you received), and the net gain or loss. Each lot is also labelled as short-term (held less than 12 months) or long-term (held 12 months or more), since these are typically taxed at different rates in most jurisdictions.

At the top of the report a summary card shows your total proceeds for the year, total cost basis, net realised gain or loss, and a breakdown between short-term and long-term totals. This is the number you (or your accountant) need for your tax return.

Losses offset gains

If you sold some positions at a loss during the year, those losses appear as negative numbers in the report and are subtracted from your gains in the summary. This is important, capital losses can reduce your taxable gain or even carry forward to offset future years' gains, depending on your jurisdiction. The report gives you the raw numbers so you or your advisor can apply the relevant rules.

Using the report with your accountant

The capital gains report gives you a clean, structured breakdown of every realised trade by tax year. You can show your accountant the summary card (total gains, short vs. long-term split) or walk them through the per-lot breakdown if they need the detail. The report covers all asset classes, stocks, ETFs, crypto, in a single view, so there's no need to pull separate reports from different brokers if your holdings are tracked in PortfolioTrackr.

When trades are missing from the report

The report is only as accurate as the trade data in your portfolio. If you sold shares but didn't log the trade in PortfolioTrackr (or imported positions without buy history), those transactions won't appear. For the most accurate report, make sure your buy and sell trades are logged chronologically. You can back-fill historical trades using the manual sell flow or the Smart & Easy Import, both accept a custom trade date so you can record older transactions accurately.

Stop Guessing at Tax Time

The capital gains report is available on all PortfolioTrackr plans. Start tracking your trades now and have your gains report ready when you need it. Free 3-day trial, no credit card required.

Start Free Trial →
Download on the App Store Get it on Google Play

Capital gains, worked out for you

Realised and unrealised gains with a country tax lens for 10 countries, exportable to CSV or PDF when your accountant asks.

See My Tax Position
Download on the App Store Get it on Google Play
See the live demo first →

Frequently asked questions

How does PortfolioTrackr calculate capital gains?

PortfolioTrackr uses the FIFO (First In, First Out) method. When you sell shares, the oldest lots you bought are matched to the sale first. The gain or loss on each lot is calculated as sale price minus that lot's cost basis.

Can I filter the capital gains report by tax year?

Yes. The gains report can be filtered by any tax year. You can also run it across all portfolios combined or for a single portfolio.

Does the report show short-term vs long-term gains?

Yes. Each realised lot is labelled short-term or long-term based on whether you held it for more or less than 12 months, since these are typically taxed at different rates.

Is the capital gains report available on all plans?

Yes. The capital gains tax report is available on all PortfolioTrackr plans including the free trial.

Daniel Hartley
Daniel Hartley writes about the fundamentals of portfolio tracking at PortfolioTrackr: profit and loss, position sizing, and turning a messy multi-broker setup into one clear picture for everyday investors.