Feature Guide

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

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 →

Frequently asked questions

How does PortfolioTrackr calculate capital gains?

Using the FIFO (First In, First Out) method. Oldest purchase lots are matched to sales first. The gain or loss is sale proceeds minus that lot's cost basis.

Does the report cover crypto as well as stocks?

Yes. All asset classes tracked in PortfolioTrackr — stocks, ETFs, crypto, commodities — are included in the capital gains report under a single view.

Can I filter by tax year?

Yes. Use the Tax Year filter in the report to switch between calendar years. The report defaults to the current year.

Is there a short-term vs long-term split?

Yes. Each realised lot is labelled short-term (held under 12 months) or long-term (12 months or more), and the summary shows the total for each category — important because they're often taxed at different rates.

Is this report available on all plans?

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

Is this financial or tax advice?

No. PortfolioTrackr provides a report of your trade data using FIFO. Tax rules vary by country and personal situation. Always consult a qualified tax advisor for advice on your specific circumstances.

← Back to blog