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.

·Updated Oct 22, 2026·9 min read
First published Jun 30, 2026·Rate data reviewed recently·Methodology →

Next steps

Read the guidance, then compare current options and run the numbers for your situation.

0% / 15% / 20%
Long-term capital gains rates
Based on total taxable income, 2026
12 months
Long-term holding threshold
One day short reverts to ordinary income rates
3.8%
Net Investment Income Tax
Applies above $200,000 single / $250,000 married AGI

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 (taxable income):

0%
Single filer income
Up to $49,450
Married filing jointly
Up to $98,900
15%
Single filer income
$49,451 – $545,500
Married filing jointly
$98,901 – $613,700
20%
Single filer income
Over $545,500
Married filing jointly
Over $613,700

For most investors, those with total taxable income under $545,500 (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 property, the starting basis is generally its fair market value at the decedent's date of death under IRC §1014, subject to exceptions and estate elections. That rule is often called a step-up, but it is not an automatic tax-free-sale guarantee: a later sale above basis creates gain, rental depreciation can reduce basis, and a nonresident state may require a return. If the property was outside the state where the heir lives, keep the property-location appraisal and check both states' rules. This guide explains the federal basis records and sale math; state filing and credit rules require location-specific advice.

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

Inherited real estate: establish the right starting number

An inherited house or rental is not documented like a brokerage transfer. Before listing it, assemble the date-of-death valuation, deed and probate or trust distribution records, the decedent's improvement and depreciation history, and later capital improvements. The date-of-death value is generally the federal starting basis, but Publication 551 describes exceptions, including an alternate valuation elected by an estate and special-use valuation. Certain inherited assets can have carryover basis instead. If the estate furnished Schedule A to Form 8971 and the consistent-basis rules apply, a beneficiary generally cannot report a basis higher than the value reported to the IRS. Ask the executor for the filed Form 706, appraisal, and any Schedule A; not every estate files Form 8971.

For property outside your home state, separate federal basis from state filing. Federal basis generally follows the inherited-property rules regardless of where you reside. The state where the real estate sits may tax gain from its sale and may require a nonresident return; your resident state may also include the gain, with any credit for tax paid elsewhere controlled by that state's law. Do not assume a federal basis figure resolves state sourcing, credits, filing thresholds, or local transfer taxes. A CPA familiar with both states can confirm the state-year treatment.

Example: Maya inherits a rental townhouse in another state when its properly supported date-of-death value is $420,000: $330,000 building and $90,000 land. Assume $8,000 of documented acquisition costs qualify for capitalization, then she spends $24,000 on a roof that qualifies as a capital improvement. Over two years, she claims $24,000 depreciation on the building. A simplified adjusted basis before sale is $420,000 + $8,000 + $24,000 − $24,000 = $428,000. If she sells for $470,000 and has $30,000 of allowable selling costs, amount realized is $440,000 and simplified gain is $12,000. Which transaction costs are capitalized or deductible depends on their nature; actual tax reporting may also involve depreciation recapture/unrecaptured §1250 gain, passive-loss carryovers, allocation of selling expenses, and state returns. The arithmetic is not a complete return calculation.

If she instead converts a former personal residence to rental use, the depreciation basis is generally the lower of adjusted basis or fair market value on the conversion date. That special depreciation rule does not simply replace the gain basis. Track the separate calculation under IRS Publication 527. Depreciation allowed or allowable generally reduces adjusted basis even if the owner failed to claim it, making old returns and property records important.

Practical sequence: request the estate's final valuation and any 8971 Schedule A; retain evidence of property condition and comparable sales near the valuation date; reconcile land/building allocation; obtain the decedent's depreciation schedules if rented; add documented improvements and subtract depreciation and other basis reductions; then model federal and each relevant state return before signing a sale contract. Before transfer or sale, ask the estate attorney or title professional whether the property's state requires an estate-tax lien waiver or other tax clearance for clear title; the requirement is jurisdiction-specific. For sales, inherited property is generally treated as long-term regardless of how long the heir held it; follow the current Form 8949 and Schedule D instructions. For more on keeping these records in an estate plan, see the estate planning checklist.

Keep a valuation file you can reproduce later

Keep the valuation tied to the date and method that actually apply. If the executor ordered a qualified appraisal, request the complete report and engagement date, not just the dollar figure in an estate summary. If no appraisal was prepared, ask a real-estate appraiser whether a retrospective valuation is possible using comparable sales and the property's condition at the applicable valuation date. A current listing estimate or a county assessment can be a lead, but do not assume either equals federal fair market value. If the estate elected an alternate valuation date, ask for the filed estate return and the valuation schedule because the date may differ from the date of death. Preserve the appraisal, source records, estate or trust distribution paperwork, land/building allocation, and any basis statement together. IRS Publication 551 explains basis evidence and inherited-property exceptions. If the reported basis conflicts with a Form 8971 Schedule A that applies, ask the executor and a tax professional to resolve the discrepancy before filing a sale return.

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 may deduct the full market value if you held the stock more than a year and itemize (limits apply), and you 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, a strategy covered in more depth in our tax-loss harvesting guide. 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 (up to $49,450 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.

Sources

Frequently Asked Questions

What is the capital gains tax rate for 2026?
Short-term gains (held 12 months or less) are taxed at your ordinary income rate, 10% to 37%. Long-term gains (held more than 12 months) are taxed at 0%, 15%, or 20% depending on your total taxable income, with an additional 3.8% Net Investment Income Tax for higher earners.
How do I avoid capital gains tax legally?
Hold assets more than a year to qualify for long-term rates, use tax-loss harvesting to offset gains, keep high-growth investments in tax-advantaged accounts like a Roth IRA or 401(k), and use the primary residence exclusion when selling a home you have lived in for at least two of the last five years.
Do I pay capital gains tax on my 401(k) or IRA?
No, not while the money stays inside the account. Traditional accounts are taxed as ordinary income when you withdraw; Roth accounts are never taxed on qualified withdrawals, including all the growth.
What is the Net Investment Income Tax?
It is an additional 3.8% Medicare surtax on net investment income, including capital gains, for taxpayers with modified AGI above $200,000 (single) or $250,000 (married filing jointly). It pushes the effective top long-term capital gains rate to 23.8%.
Newsletter

The 5-minute money briefing

One email per week. The biggest changes in savings, money market, checking and CD rates.

Send me the weekly SwitchWize rate briefing: the biggest changes in savings, money market, checking and CD rates. Unsubscribe in one click. We never share your address.

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?

Found an inaccurate, outdated, or missing claim? Report a correction. We verify reports against the relevant source before changing a guide or ranking.

Why SwitchWize

SwitchWize was founded on the simple belief that banking should work for people, not the other way around. We break down information barriers with transparent rate comparisons, clear guidance, and simple tools — so every American can decide with confidence.

Read our full ethos

Get the week's biggest rate changes in savings, CDs and mortgages, free.

Or run your Money Map in 90 seconds.

Send me the weekly SwitchWize rate briefing: the biggest changes in savings, money market, checking and CD rates. Unsubscribe in one click. We never share your address.