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
Assets held 1 year or less are taxed as ordinary income. Your rate depends on your total income and tax bracket.
Long-Term Gains
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:
Tax Rates by Country
United States Capital Gains Tax Rates (2026)
| Income Level (Single) | Long-Term Rate | Short-Term Rate |
|---|---|---|
| Up to $47,025 | 0% | 10-12% |
| $47,026 - $518,900 | 15% | 22-35% |
| Over $518,900 | 20% | 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 Type | Basic Rate | Higher Rate |
|---|---|---|
| Stocks & Shares | 18% | 24% |
| Carried Interest | 18% | 28% |
Annual CGT allowance: £3,000 (reduced from £6,000). Gains within ISAs are completely tax-free.
Australia Capital Gains Tax
| Holding Period | Tax Treatment |
|---|---|
| Less than 12 months | Full gain taxed at marginal rate |
| 12+ months | 50% 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
| Type | Rate |
|---|---|
| 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.
| Method | Description | Best For |
|---|---|---|
| FIFO | First In, First Out - oldest shares sold first | Default method, often highest tax |
| LIFO | Last In, First Out - newest shares sold first | Rising markets (higher cost basis) |
| Specific ID | You choose which shares to sell | Maximum tax optimization |
| Average Cost | Average of all purchase prices | Mutual 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
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