Every time you sell an asset for more than you paid for it — a stock, a rental property, a business, cryptocurrency, even a piece of art — the profit is a capital gain, and the IRS wants its share. How much they take depends almost entirely on one factor: how long you held the asset before selling.

Hold it for a year or less, and the gain is taxed at your ordinary income rate — up to 37%. Hold it for more than a year, and the rate drops dramatically — to 0%, 15%, or 20%. That single distinction can mean the difference between paying $37,000 or $15,000 in taxes on a $100,000 gain.

This guide explains how capital gains tax works, the exact rates for every income level, the exemptions and exclusions available, and the strategies investors and business owners use to legally minimize what they owe.

What Is a Capital Gain

A capital gain is the profit from selling a capital asset for more than its cost basis.

Capital assets include:

  • Stocks, bonds, mutual funds, and ETFs
  • Real estate (primary home, rental properties, land, commercial property)
  • Cryptocurrency (Bitcoin, Ethereum, all digital assets)
  • Business interests (selling a business or partnership share)
  • Collectibles (art, antiques, coins, stamps, precious metals)
  • Vehicles, boats, and other personal property
  • Intellectual property

Your cost basis is generally what you paid for the asset, plus certain adjustments:

  • Purchase price
  • Plus: buying commissions or fees
  • Plus: cost of improvements (for real estate)
  • Minus: depreciation claimed (for rental property or business assets)
  • Minus: return of capital distributions (for investments)

Capital gain = Sale price - Cost basis - Selling costs

Example: You bought stock for $10,000, paid $50 in commission, and sold it for $25,000 with $50 in commission. Cost basis: $10,050 Net proceeds: $24,950 Capital gain: $14,900

Short-Term vs. Long-Term: The Holding Period

The tax treatment of your gain depends on how long you owned the asset:

Short-term capital gains: Assets held for one year or less. Taxed as ordinary income at your marginal tax rate (10% to 37%).

Long-term capital gains: Assets held for more than one year (at least one year and one day). Taxed at preferential rates: 0%, 15%, or 20%.

The holding period starts the day after you acquire the asset and ends on the day you sell it.

Example: You buy stock on March 15, 2025. To qualify for long-term treatment, you must sell on or after March 16, 2026. Selling on March 15, 2026 is still short-term — you need more than one year.

This distinction is the single most important factor in capital gains taxation. Holding an asset for one extra day can cut your tax rate by more than half.

Long-Term Capital Gains Tax Rates

Long-term capital gains are taxed at three rates based on your taxable income (including the gains):

0% Rate (approximate 2026 thresholds):

  • Single: taxable income up to $47,025
  • Married filing jointly: up to $94,050
  • Head of household: up to $63,000

15% Rate:

  • Single: $47,026 to $518,900
  • Married filing jointly: $94,051 to $583,750
  • Head of household: $63,001 to $551,350

20% Rate:

  • Single: over $518,900
  • Married filing jointly: over $583,750
  • Head of household: over $551,350

The 0% rate is remarkable and underutilized. If your taxable income (after deductions) is below the threshold, you pay zero federal tax on long-term capital gains. This is available to:

  • Retirees with modest income
  • People between jobs
  • Anyone with a low-income year
  • Married couples where one spouse earns significantly less
  • Young adults early in their careers

Example: A married couple with $70,000 in taxable income from wages sells stock with a $20,000 long-term gain. Their total taxable income is $90,000. Since $90,000 is below the $94,050 threshold, the entire $20,000 gain is taxed at 0%. They owe nothing on the gain.

If their income were $100,000 before the gain, the first portion of the gain (up to the $94,050 threshold) would be taxed at 0%, and the remainder at 15%.

Short-Term Capital Gains Tax Rates

Short-term gains receive no preferential treatment. They're added to your ordinary income and taxed at your marginal rate:

  • 10%: $0 - $11,600 (single)
  • 12%: $11,601 - $47,150
  • 22%: $47,151 - $100,525
  • 24%: $100,526 - $191,950
  • 32%: $191,951 - $243,725
  • 35%: $243,726 - $609,350
  • 37%: over $609,350

Example: You earn $90,000 in wages and have a $20,000 short-term capital gain. The gain is stacked on top of your wages. Most of that $20,000 falls in the 24% bracket. You owe approximately $4,800 on the gain.

If that same $20,000 were a long-term gain, you'd owe approximately $3,000 (15% rate) or potentially less. The holding period alone saves $1,800.

Net Investment Income Tax (NIIT)

In addition to capital gains tax, high-income taxpayers owe an additional 3.8% Net Investment Income Tax on investment income (including capital gains) if their modified AGI exceeds:

  • $200,000 (single)
  • $250,000 (married filing jointly)
  • $125,000 (married filing separately)

The 3.8% applies to the lesser of your net investment income or the amount by which your MAGI exceeds the threshold.

Example: Single filer with $180,000 in wages and $50,000 in long-term capital gains. MAGI: $230,000. Excess over $200,000 threshold: $30,000. Net investment income: $50,000. NIIT applies to the lesser: $30,000 x 3.8% = $1,140.

This means high-income taxpayers with long-term gains effectively pay 18.8% (15% + 3.8%) or 23.8% (20% + 3.8%), not just 15% or 20%.

Capital Gains on Real Estate

Primary Residence: The Section 121 Exclusion

When you sell your primary home, you can exclude up to:

  • $250,000 in gain (single filers)
  • $500,000 in gain (married filing jointly)

Requirements:

  • You owned the home for at least 2 of the 5 years before the sale
  • You lived in the home as your primary residence for at least 2 of the 5 years before the sale
  • You haven't used the exclusion in the past 2 years

The 2 years don't need to be consecutive. If you lived in the home for 2 years, moved out, rented it for 2 years, and then sold it, you still qualify (you're within the 5-year lookback).

Example: You bought your home for $300,000 and sell it for $700,000. Your gain is $400,000. If you're married filing jointly and meet the requirements, you exclude the entire $400,000. Zero capital gains tax.

If you're single, you exclude $250,000 and pay capital gains tax on the remaining $150,000.

Partial exclusion: If you don't meet the 2-year requirement due to a job change, health condition, or unforeseen circumstances, you may qualify for a partial exclusion prorated by the time you lived there.

Rental Property and Investment Real Estate

No exclusion applies to rental or investment property sales. The full gain is taxable. However, several strategies can defer or reduce the tax:

Section 1031 Exchange (Like-Kind Exchange). Swap one investment property for another of equal or greater value and defer the entire capital gain. You don't pay tax until you eventually sell without exchanging. Many real estate investors chain 1031 exchanges for decades, deferring gains indefinitely.

Requirements: Both properties must be held for investment or business use (not personal use). You have 45 days to identify replacement properties and 180 days to close. Must use a qualified intermediary to hold the funds.

Installment Sale. Instead of receiving the full sale price at once, structure the sale so the buyer pays over time. You recognize the gain proportionally as you receive payments, spreading the tax liability over multiple years and potentially staying in lower tax brackets.

Depreciation Recapture. When you sell rental property, any depreciation you claimed (or could have claimed) is "recaptured" and taxed at 25% — not at the lower long-term capital gains rate. This is in addition to capital gains tax on the remaining profit.

Example: You bought a rental property for $300,000. You claimed $80,000 in depreciation over the years. You sell for $450,000.

Adjusted basis: $300,000 - $80,000 = $220,000 Total gain: $450,000 - $220,000 = $230,000 Depreciation recapture: $80,000 taxed at 25% = $20,000 Remaining gain: $150,000 taxed at 15% long-term rate = $22,500 Total tax: $42,500

Capital Gains on Cryptocurrency

Cryptocurrency is treated as property by the IRS — not as currency. Every sale, exchange, or use of cryptocurrency is a taxable event.

Taxable events:

  • Selling crypto for cash
  • Trading one cryptocurrency for another (e.g., Bitcoin for Ethereum)
  • Using crypto to buy goods or services
  • Receiving crypto as payment for services (taxed as ordinary income at receipt, then capital gains/losses on subsequent sale)

Non-taxable events:

  • Buying crypto with cash
  • Transferring crypto between your own wallets
  • Gifting crypto (though the recipient inherits your cost basis)

The same short-term/long-term rules apply. Hold crypto for more than one year before selling for the preferential long-term rate.

Tracking crypto cost basis can be complex, especially with multiple purchases at different prices. Methods include:

  • FIFO (First In, First Out): Oldest coins are sold first
  • LIFO (Last In, First Out): Newest coins sold first
  • Specific identification: You choose which specific coins to sell

Specific identification often produces the best tax result because you can select the highest-cost-basis coins to minimize gain (or maximize loss). Your CPA and crypto tax software can help determine the optimal method.

Collectibles Tax Rate

Gains on collectibles held for more than one year are taxed at a maximum rate of 28% — higher than the standard 15%/20% long-term rate.

Collectibles include:

  • Art and antiques
  • Coins and stamps
  • Gems and jewelry
  • Precious metals (gold, silver, platinum)
  • Rugs and wine
  • Certain other tangible personal property

This is a commonly overlooked provision. Investors who buy gold ETFs backed by physical gold, for example, may be surprised to learn their gains are taxed at 28%, not 15%.

Qualified Small Business Stock (QSBS) Exclusion

Section 1202 provides one of the most generous capital gains exclusions in the tax code:

If you hold qualified small business stock for at least 5 years, you can exclude up to the greater of $10 million or 10 times your basis in the stock from capital gains tax.

Requirements:

  • The stock must be in a C-Corporation
  • The corporation must have had aggregate gross assets of $50 million or less when the stock was issued
  • The stock must have been acquired at original issuance (not purchased on the secondary market)
  • Held for at least 5 years
  • The corporation must be an active business (not investment, real estate, banking, farming, or professional services)

This exclusion can eliminate tens of millions of dollars in capital gains tax for startup founders and early employees. It's one of the primary reasons tech companies are often structured as C-Corporations.

Tax-Loss Harvesting

Tax-loss harvesting is the strategy of selling investments at a loss to offset capital gains. It's one of the most effective tools for managing capital gains tax.

How it works:

  1. You sell an investment that has declined in value, realizing a capital loss
  2. The loss offsets your capital gains, reducing your tax
  3. You reinvest in a similar (but not identical) investment to maintain your market position

Rules:

  • Short-term losses first offset short-term gains (which are taxed at higher rates)
  • Long-term losses first offset long-term gains
  • Net losses of one type offset gains of the other type
  • If total losses exceed total gains, you can deduct up to $3,000 of excess losses against ordinary income per year ($1,500 if married filing separately)
  • Remaining losses carry forward indefinitely

The Wash Sale Rule: You cannot sell a security at a loss and repurchase the same or "substantially identical" security within 30 days before or after the sale. If you do, the loss is disallowed.

Workaround: Sell the losing investment and immediately buy a similar but not identical replacement. Sell a total stock market index fund and buy an S&P 500 index fund. Sell one tech ETF and buy a different tech ETF. The investments are similar enough to maintain your market exposure but different enough to avoid the wash sale rule.

Example: You have $30,000 in long-term capital gains from selling a stock. You also hold another stock with a $20,000 unrealized loss. You sell the losing stock, harvesting the $20,000 loss, and immediately buy a similar ETF.

Without harvesting: $30,000 gain x 15% = $4,500 tax With harvesting: ($30,000 - $20,000) = $10,000 net gain x 15% = $1,500 tax Savings: $3,000

Tax-loss harvesting should be done throughout the year — not just in December. Losses can appear and disappear as markets move.

Strategies to Minimize Capital Gains Tax

Hold investments for more than one year. The simplest and most effective strategy. Moving from short-term to long-term treatment can cut your rate from 37% to 15% (or even 0%).

Harvest the 0% bracket. If your taxable income falls below the 0% threshold in any year, sell long-term investments to realize gains tax-free. This is especially powerful during retirement, between jobs, or in years with large deductions.

Use tax-advantaged accounts. Investments held in 401(k)s, IRAs, and Roth accounts don't trigger capital gains tax when sold. Buy and sell freely within these accounts. Put your highest-growth investments in Roth accounts where the gains will never be taxed.

Donate appreciated assets. Instead of selling appreciated stock and donating cash, donate the stock directly to charity. You get a deduction for the full market value and pay zero capital gains tax on the appreciation.

Example: Stock purchased for $5,000, now worth $25,000. If you sell and donate the cash: $20,000 gain x 15% = $3,000 tax, then $25,000 deduction. If you donate the stock directly: $0 tax, $25,000 deduction. You save $3,000.

Use a 1031 exchange for real estate. Defer gains on investment property indefinitely by exchanging into replacement property.

Consider Qualified Opportunity Zone funds. Invest capital gains into a QOZ fund within 180 days of the sale. You defer the original gain and potentially eliminate tax on the new investment's appreciation if held for 10+ years.

Gift appreciated assets to family in lower brackets. If family members are in the 0% capital gains bracket, gifting them appreciated stock allows them to sell at the 0% rate. Be aware of the kiddie tax rules for children under 19 (or under 24 if a full-time student) — unearned income above $2,500 may be taxed at the parent's rate.

Offset gains with losses. Tax-loss harvesting throughout the year systematically reduces your capital gains tax burden.

Time your sales. If you're near the boundary between the 0% and 15% brackets, or the 15% and 20% brackets, you can time sales to stay in the lower bracket. Spread large gains across multiple tax years instead of recognizing everything at once.

Step-up in basis at death. When you die, your heirs receive your assets with a "stepped-up" cost basis equal to the fair market value at the date of death. All unrealized gains during your lifetime disappear for tax purposes. This is why many wealthy individuals hold appreciated assets until death rather than selling. (Note: This provision is periodically debated in Congress and could change.)

Common Mistakes

Selling just before the one-year mark. Selling a winning investment at 11 months instead of 13 months can cost you thousands. If you're close to the long-term threshold, wait.

Ignoring the wash sale rule. Selling a stock for a loss and immediately rebuying it (or buying a "substantially identical" ETF) within 30 days invalidates the loss. Plan your repurchase carefully.

Forgetting about state capital gains tax. Most states tax capital gains as ordinary income. California charges up to 13.3% on capital gains. Even with a 15% federal rate, your total rate could be nearly 30% when including state tax and NIIT.

Not tracking cost basis. Without accurate cost basis records, you may overpay taxes by reporting a lower basis than you're entitled to. Keep purchase records for all investments, especially crypto and real estate.

Triggering unnecessary gains in taxable accounts. Mutual funds that frequently buy and sell within the fund distribute capital gains to shareholders — even if you didn't sell anything. Index funds and tax-managed funds are more tax-efficient.

Missing the home sale exclusion requirements. If you convert a primary residence to a rental or move out too soon, you might not meet the 2-out-of-5-year requirement when you sell.

How a CPA Helps with Capital Gains

A CPA integrates capital gains management into your overall tax strategy:

Timing optimization. A CPA models the tax impact of selling assets in the current year vs. future years, considering your projected income, bracket changes, and the NIIT threshold.

Loss harvesting coordination. A CPA identifies tax-loss harvesting opportunities across your portfolio while maintaining your desired asset allocation and avoiding wash sale issues.

Real estate transaction planning. For property sales, a CPA coordinates 1031 exchanges, installment sales, depreciation recapture, and state tax implications — decisions that can save tens of thousands on a single transaction.

Multi-year capital gains planning. For business sales, stock option exercises, or other large gains, a CPA structures the transaction across years to minimize the total tax bill.

QSBS qualification. A CPA ensures your stock meets all Section 1202 requirements, potentially saving millions in capital gains tax when you sell.

Capital gains tax is one of the areas where proactive planning has the highest payoff. A single well-timed decision can save more than most people pay their CPA in a decade.

Find a CPA who specializes in investment tax planning and capital gains strategies at ListMyCpa.com. Search by state, city, and specialization to connect with the right professional for your situation.