AIV Logo AIV Assistant

Loading...

Capital Gains Tax Guide: Calculate & Minimize Your Investment Taxes

Understand how capital gains tax works, learn the rates for your jurisdiction, and discover legal strategies to keep more of your investment profits.

16 min read

What is Capital Gains Tax?

Capital gains tax (CGT) is a tax on the profit you make when you sell an investment for more than you paid for it. The key word is realized - you only owe tax when you actually sell the asset and lock in the gain.

If your stock doubles in value but you don't sell, you have an unrealized gain and owe no tax. The moment you sell, the gain becomes realized and taxable.

Capital Gain = Proceeds - Cost Basis

Your proceeds are what you receive from selling. Your cost basis is what you paid (including commissions). The difference is your taxable gain (or deductible loss).

Short-Term vs Long-Term Capital Gains

In the United States (and many other countries), how long you held an investment dramatically affects your tax rate.

Short-Term Gains

Up to 37%

Assets held 1 year or less are taxed as ordinary income. Your rate depends on your total income and tax bracket.

Long-Term Gains

0%, 15%, or 20%

Assets held more than 1 year get preferential rates. Most people pay 15% or less on long-term gains.

The 1-Year Rule

If you're close to the 1-year mark, waiting a few extra days to sell can cut your tax rate nearly in half. A $10,000 gain taxed at 37% costs $3,700. At 15%, it's only $1,500.

How to Calculate Capital Gains Tax

Example Calculation

You bought 100 shares of AAPL at $150, sold at $200 after 14 months:

Purchase Price (100 × $150)$15,000
Sale Proceeds (100 × $200)$20,000
Capital Gain$5,000
Holding Period14 months (Long-term)
Tax Rate (assuming 15%)15%
Tax Owed$750

Tax Rates by Country

United States Capital Gains Tax Rates (2026)

Income Level (Single)Long-Term RateShort-Term Rate
Up to $47,0250%10-12%
$47,026 - $518,90015%22-35%
Over $518,90020%37%

Plus 3.8% Net Investment Income Tax (NIIT) if income exceeds $200,000 (single) or $250,000 (married).

United Kingdom Capital Gains Tax Rates (2025/26)

Taxpayer TypeBasic RateHigher Rate
Stocks & Shares18%24%
Carried Interest18%28%

Annual CGT allowance: £3,000 (reduced from £6,000). Gains within ISAs are completely tax-free.

Australia Capital Gains Tax

Holding PeriodTax Treatment
Less than 12 monthsFull gain taxed at marginal rate
12+ months50% CGT discount (only half taxed)

Capital gains are added to your income and taxed at your marginal tax rate (up to 45%).

Germany Capital Gains Tax

TypeRate
Abgeltungsteuer (Flat Tax)25%
Plus Solidarity Surcharge+5.5% of tax
Effective Rate~26.375%

€1,000 annual exemption (Sparerpauschbetrag). No distinction between short and long-term.

Strategies to Minimize Capital Gains Tax

Hold for Long-Term

Wait at least 1 year before selling to qualify for preferential long-term rates. The difference can be 20%+ in tax savings.

Tax-Loss Harvesting

Sell losing positions to offset gains. Losses offset gains dollar-for-dollar, reducing your tax bill. Learn more →

Use Tax-Advantaged Accounts

401(k), IRA, Roth IRA (US), ISA (UK), TFSA (Canada) - gains inside these accounts are tax-free or tax-deferred.

Donate Appreciated Stock

Donating stock instead of cash lets you deduct the full market value without paying capital gains tax on the appreciation.

Time Your Sales

Sell in years when your income is lower (retirement, sabbatical) to stay in lower tax brackets.

Choose Cost Basis Wisely

Use specific identification to sell highest-cost shares first, minimizing your gain. Learn about FIFO vs LIFO →

Cost Basis Methods

When you've bought the same stock at different prices, which shares are you selling? The method you choose affects your taxable gain.

MethodDescriptionBest For
FIFOFirst In, First Out - oldest shares sold firstDefault method, often highest tax
LIFOLast In, First Out - newest shares sold firstRising markets (higher cost basis)
Specific IDYou choose which shares to sellMaximum tax optimization
Average CostAverage of all purchase pricesMutual funds, simplicity

Track Your Cost Basis

Your broker reports cost basis to the IRS, but they may use FIFO by default. If you want to use specific identification, you must specify which shares before selling and keep records.

Frequently Asked Questions

What is capital gains tax?
Capital gains tax (CGT) is a tax on the profit you make when selling an investment for more than you paid. It only applies to realized gains - you don't owe tax until you actually sell the asset and lock in the profit.
What is the difference between short-term and long-term capital gains?
In the US, short-term gains (assets held less than 1 year) are taxed as ordinary income at rates up to 37%. Long-term gains (held over 1 year) get preferential rates of 0%, 15%, or 20% depending on your income level. This distinction makes holding for at least a year valuable.
How can I legally reduce capital gains tax?
Key strategies include: holding investments over 1 year for lower rates, tax-loss harvesting to offset gains with losses, using tax-advantaged accounts (401k, IRA, ISA), donating appreciated stock to charity, choosing optimal cost basis methods, and timing sales for low-income years.
Do I pay capital gains tax on dividends?
Dividends are taxed separately from capital gains. Qualified dividends (most US stock dividends) receive preferential tax treatment similar to long-term capital gains. Ordinary dividends are taxed as regular income. Capital gains only apply when you sell an asset.

Calculate Your Capital Gains Tax

AllInvestView tracks your cost basis, calculates gains by tax lot, and supports multiple cost basis methods including FIFO, LIFO, and Specific Identification.

Generate Tax Report