Features Markets Alerts Brokers Pricing Live Demo Blog About Sign In Start Free →
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 · · 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 maths for you, every realised trade and 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, with the US as your tax country: 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. With the US as your tax country, each lot is also labelled as short-term (held one year or less) or long-term (held more than one year), since the US taxes the two at different rates.

At the top of the report a summary card shows your net realised gain or loss for the year, with short-term and long-term totals beside it when you use the US rules. This is the figure you (or your accountant) start from 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 stocks, ETFs and crypto in a single view, built only from the trades you have 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.

Frequently asked questions

How does PortfolioTrackr calculate capital gains?

PortfolioTrackr applies the rules of the tax country you pick; with the US it 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, under the US rules. 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.

Which plans include the capital gains report?

The Pro and Lifetime plans include the capital gains tax report.

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.
All articles by Daniel →
Drafted with AI tools and published by PortfolioTrackr, founded by GJ Jones. How we research and check articles · Corrections