What Are Capital Gains?
A capital gain is the profit you make when you sell an investment for more than you paid. It's the difference between your sale price and your cost basis (what you originally paid plus any fees).
Simple Example:
- • You buy 50 shares of stock at $100 each = $5,000 cost basis
- • You sell all 50 shares at $140 each = $7,000 sale proceeds
- • Your capital gain = $7,000 - $5,000 = $2,000 profit
Capital gains apply to stocks, ETFs, mutual funds, bonds, real estate, and most other investments. The tax you owe depends on how long you held the investment.
Short-Term vs Long-Term Capital Gains
The IRS treats capital gains very differently based on your holding period - how long you owned the investment before selling.
Short-Term Capital Gains (1 Year or Less)
If you sell an investment you've held for one year or less, the profit is taxed as ordinary income - the same rate as your salary.
Long-Term Capital Gains (More Than 1 Year)
If you sell an investment you've held for more than one year, you qualify for preferential tax rates that are much lower.
Important: The holding period must be more than one year, not exactly one year. If you buy on January 15, 2025, you must sell on January 16, 2026 or later to qualify for long-term treatment.
Capital Gains Tax Rates (2025)
Your long-term capital gains rate depends on your taxable income:
| Long-Term Rate | Single Filer Income | Married Filing Jointly |
|---|---|---|
| 0% | Up to $48,350 | Up to $96,700 |
| 15% | $48,351 - $533,400 | $96,701 - $600,050 |
| 20% | Over $533,400 | Over $600,050 |
Source: IRS Topic 409 (2025). Thresholds adjust annually for inflation. For 2026 limits, check IRS.gov.
Net Investment Income Tax (NIIT):
High earners may owe an additional 3.8% surtax on investment income. The NIIT applies to individuals with modified adjusted gross income (MAGI) over $200,000 (single) or $250,000 (married filing jointly). This is on top of the capital gains rates above.
Real impact: If you're in the 24% income tax bracket and have a $10,000 gain, selling after 11 months costs you $2,400 in taxes (short-term). Waiting one more month to hit 12 months+ means you pay only $1,500 at the 15% long-term rate. That's $900 saved just by waiting a few weeks.
Cost Basis Explained
Your cost basis is what you paid for an investment, including any fees. It's essential for calculating your gain or loss accurately.
What's Included in Cost Basis?
- •Purchase price - What you paid per share
- •Trading fees/commissions - Though most brokers are now commission-free
- •Reinvested dividends - If you use DRIP, each reinvestment has its own cost basis
If you bought the same stock multiple times at different prices, you have multiple "lots" with different cost bases. Your broker tracks this, but you can choose which shares to sell to optimize your taxes.
Strategies to Minimize Capital Gains Taxes
Hold for more than one year when possible
The simplest strategy: wait to qualify for long-term rates. If you're close to the one-year mark, consider waiting.
Use tax-advantaged accounts
In 401(k)s and IRAs, you can buy and sell without triggering capital gains taxes. Consider holding actively-traded investments there.
Harvest losses to offset gains
Sell losing investments to offset gains - we'll cover this in detail in the tax-loss harvesting lesson.
Choose high-cost-basis shares to sell
When selling partial positions, selling higher-cost shares first reduces your taxable gain. Most brokers let you specify which lots to sell.
Note: Tax optimization should be one factor in investment decisions, not the only factor. Don't hold a losing investment just to avoid short-term gains, and don't let tax concerns prevent you from selling when you should. Consult a tax professional for personalized advice.
Now you understand how capital gains work. Next, we'll learn about tax-loss harvesting - a powerful strategy to use investment losses to reduce your taxes.