Tax BasicsLesson 2

Capital Gains Explained

The difference between short-term and long-term can save you thousands.

8 min read
Beginner
Sean ShaReviewed by Sean Sha
Updated: February 2026

Educational purposes only. This content does not constitute investment advice. Read our disclaimer

StockCram is not a broker-dealer, investment adviser, or financial institution. All content is for educational and informational purposes only and should not be construed as personalized investment advice. Consult a qualified financial professional before making investment decisions. Past performance does not guarantee future results.

TL;DR

Capital gains are profits from selling investments. Short-term gains (held 1 year or less) are taxed at ordinary income rates up to 37%. Long-term gains (held over 1 year) are taxed at 0%, 15%, or 20%. Holding investments longer almost always means lower taxes.

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.

Tax rate: 10% to 37% depending on your income bracket

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.

Tax rate: 0%, 15%, or 20% depending on your income

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 RateSingle Filer IncomeMarried Filing Jointly
0%Up to $48,350Up to $96,700
15%$48,351 - $533,400$96,701 - $600,050
20%Over $533,400Over $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

1

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.

2

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.

3

Harvest losses to offset gains

Sell losing investments to offset gains - we'll cover this in detail in the tax-loss harvesting lesson.

4

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.

Key Takeaways

  • Holding period determines your rate - Over 1 year = long-term (lower rates). 1 year or less = short-term (higher rates).
  • Long-term rates are much lower - Most people pay 0% or 15% on long-term gains vs up to 37% on short-term.
  • Cost basis matters - Your taxable gain is sale price minus cost basis, so track what you paid.
  • Timing your sales can save money - Waiting to hit the 1-year mark can significantly reduce your tax bill.

Continue Learning

Frequently Asked Questions

For 2025, long-term capital gains rates are 0% if your taxable income is below $48,350 (single) or $96,700 (married filing jointly), 15% for income up to $533,400 (single) or $600,050 (married), and 20% for higher incomes. These thresholds adjust annually for inflation.

Your cost basis is what you paid for the investment, plus any fees or commissions. For stocks, it's typically the purchase price times the number of shares, plus trading fees. If you received shares through inheritance, gifts, or stock splits, the rules differ - consult a tax professional.

You can choose which shares to sell using specific identification, or your broker may default to FIFO (first in, first out). This affects your gain or loss calculation. Consider which lots to sell to optimize your tax situation.

Yes - inside 401(k)s and IRAs, you can buy and sell investments without triggering capital gains taxes. Traditional accounts are taxed as ordinary income when you withdraw. Roth account withdrawals are completely tax-free if qualified.

Share