Taxes · Guide

Capital Gains Tax Explained: Rates, Rules, and How to Minimize It

Capital gains tax applies when you sell an investment for more than you paid. The rate depends on how long you held it and your income. Here's how it works and the legal strategies to reduce it.

·Jun 30, 2026·4 min read
Rate data last reviewed 20634d ago·Methodology →

Bottom line: Sell an investment you held less than one year and pay your ordinary income tax rate. Hold it more than one year and pay 0%, 15%, or 20% — significantly lower for most investors. The single most accessible tax strategy is simply holding investments long enough to qualify for long-term rates.


Capital gains are profits from selling a capital asset — stocks, bonds, real estate, cryptocurrency, collectibles — for more than you paid (your "basis"). The tax owed depends on two things: how long you held the asset and your total taxable income.

Short-Term vs. Long-Term Capital Gains

Short-term: Held 12 months or less. Taxed as ordinary income — the same rates as your salary (10%–37%).

Long-term: Held more than 12 months. Taxed at preferential rates.

2026 long-term capital gains rates (approximate):

RateSingle filer incomeMarried filing jointly
0%Up to ~$47,025Up to ~$94,050
15%$47,026 – $518,900$94,051 – $583,750
20%Over $518,900Over $583,750

For most investors — those with total taxable income under $518,900 (single) — long-term gains are taxed at 15%. For lower-income investors, the 0% rate means no federal tax on qualifying investment profits.

What Counts as Your Basis

Your basis is what you paid for the investment, including commissions and fees. When you sell, the gain is the selling price minus your basis.

Example: You bought 100 shares at $40 each ($4,000 total) and sell for $65 each ($6,500). Your gain is $2,500. If held more than a year, that $2,500 is a long-term capital gain.

For inherited assets, the basis is "stepped up" to the market value at the date of death — meaning inherited stock with a large unrealized gain may be sold immediately with no capital gains tax at all.

For gifted assets, the recipient generally takes the donor's original basis.

The Net Investment Income Tax (NIIT)

Higher earners pay an additional 3.8% Medicare surtax on net investment income (including capital gains) when modified AGI exceeds $200,000 (single) or $250,000 (married). This pushes the effective top rate on long-term gains to 23.8%.

Key Takeaways
  • The holding period clock starts the day after you purchase an asset and runs through the day you sell. Selling one day too early converts a 15% long-term gain into a 22–32% short-term gain — a costly timing mistake on large positions.
  • Capital gains in tax-advantaged accounts (IRAs, 401(k)s) are not taxed when realized. You only pay tax when you withdraw from a traditional account. Roth accounts have no capital gains tax ever. This is a core reason to keep growth assets inside tax-advantaged accounts.
  • Donating appreciated stock directly to charity avoids capital gains tax entirely — you deduct the full market value and never pay tax on the gain. This is more tax-efficient than selling the stock and donating the cash proceeds.

Legal Strategies to Reduce Capital Gains Tax

Hold assets longer than one year. The most straightforward strategy. A 22% short-term rate dropping to 15% long-term on a $50,000 gain is $3,500 in savings.

Tax-loss harvesting. Sell investments at a loss to offset gains. Net losses can reduce your capital gains dollar-for-dollar; up to $3,000 in excess losses can offset ordinary income annually. Losses beyond $3,000 carry forward to future years.

Use tax-advantaged accounts for high-growth assets. Investments that generate significant gains belong in Roth IRAs or 401(k)s where gains are sheltered from annual taxation.

Time sales across tax years. If you have a large gain to realize, consider splitting the sale across two tax years to keep income below rate thresholds.

0% bracket harvesting. If your income is low enough to qualify for the 0% long-term rate (under ~$47,025 single in 2026), you can sell appreciated assets, realize gains tax-free, and buy them back immediately — resetting your basis higher with no tax cost. This strategy, called "gain harvesting," is the opposite of tax-loss harvesting and works when your income is temporarily low.

Primary residence exclusion. Gain from selling your primary home is excluded from tax up to $250,000 (single) or $500,000 (married), provided you lived in it for at least 2 of the last 5 years.


Capital gains rates and income thresholds adjust annually. Verify current rates at IRS.gov before making investment decisions based on tax considerations.

Frequently Asked Questions

What should I do after reading Capital Gains Tax Explained: Rates, Rules, and How to Minimize It?
Use the next-step module on this page to compare the relevant taxes options, run the related calculator, or start Money Map if you want SwitchWize to rank this decision against your savings, debt, mortgage, and card opportunities.
Can Money Map help with taxes decisions like this?
Yes. Money Map compares this topic with your other financial opportunities so you can see whether it is your highest-impact next move or a lower-priority follow-up.
Are the products mentioned in this article paid placements?
No. Organic rankings are based on rate, fees, trust signals, product fit, and switching friction. SwitchWize may earn a referral fee from some providers, but that does not change the organic ranking order.
How often is this article reviewed?
SwitchWize reviews rate-sensitive articles on a recurring cadence and updates dated claims, product links, and calculator paths when the underlying data changes.
Next step
Find your best money move in 90 seconds.

Answer a few questions about your situation and goals. Money Map points you to the highest-value next step across savings, mortgage, cards, and debt.

Editorial review

What changed since the last update

Reviewed dataRate references, product links, and dated claims were checked against current SwitchWize sources.
Updated contextRelated calculators, Money Map paths, and offer links were refreshed for this article topic.
StandardsReviewed under the SwitchWize editorial policy. See standards →

Was this guide helpful?