Skip to main content
Loading...

Capital Gains Tax Calculator

Estimate your federal and state capital gains tax on investment sales. See your expected tax bill, effective rate, and after-tax proceeds based on your income, filing status, and holding period.

Enter your investment details and click calculate to estimate your capital gains tax

Tax Essentials

How Capital Gains Tax Works

Capital gains tax applies to the profit you earn when selling an investment for more than you paid.

When you sell a stock, mutual fund, ETF, real estate, or other capital asset at a profit, you owe capital gains tax on the difference between your sale price and your cost basis (generally the original purchase price plus any transaction fees). The tax rate depends primarily on how long you held the asset before selling.

Short-Term vs. Long-Term Capital Gains

The IRS distinguishes between short-term and long-term capital gains based on your holding period. Assets held for one year or less before selling generate short-term capital gains, which are taxed at your ordinary income tax rate. Assets held for more than one year qualify for long-term capital gains treatment, which carries significantly lower tax rates of 0%, 15%, or 20% depending on your taxable income and filing status.

This distinction creates a meaningful tax incentive to hold investments for at least one year before selling. For example, a taxpayer in the 24% ordinary income bracket who sells a stock at a $10,000 profit would owe $2,400 in tax on a short-term gain but only $1,500 on a long-term gain taxed at 15%. That single decision to hold slightly longer saves $900 in taxes on the same profit.

Net Investment Income Tax (NIIT)

High-income taxpayers may also owe the Net Investment Income Tax, an additional 3.8% surtax on investment income. This applies when your modified adjusted gross income exceeds $200,000 for single filers or $250,000 for married couples filing jointly. The NIIT applies to the lesser of your net investment income or the amount by which your MAGI exceeds the threshold, and it is assessed on top of the regular capital gains rate.

Capital Losses and Netting

If you sell investments at a loss, those capital losses can offset your capital gains dollar for dollar. Short-term losses first offset short-term gains, and long-term losses first offset long-term gains, with any remaining losses applied to the other category. If your total losses exceed your total gains, you can deduct up to $3,000 of net capital losses against ordinary income per year, with any excess carried forward to future tax years indefinitely.

2026 Tax Brackets for Capital Gains

Long-Term Capital Gains Rates by Filing Status

RateSingleMarried Filing JointlyHead of Household
0%Up to $48,350Up to $96,700Up to $64,750
15%$48,351 – $533,400$96,701 – $600,050$64,751 – $566,700
20%Over $533,400Over $600,050Over $566,700

Thresholds shown are approximate for the 2026 tax year. Short-term gains are taxed at ordinary income rates ranging from 10% to 37%.

Short-Term Capital Gains (Ordinary Income Rates)

Short-term capital gains do not receive any preferential tax treatment. They are added to your other taxable income and taxed at your marginal ordinary income tax rate. The 2026 federal income tax brackets range from 10% on the first portion of income up to 37% on income exceeding $609,350 for single filers or $731,200 for married couples filing jointly.

The gap between short-term and long-term rates can be substantial. A single filer earning $200,000 who realizes a $50,000 short-term gain would pay a 32% marginal rate ($16,000 in tax), while the same gain classified as long-term would be taxed at 15% ($7,500). Understanding these rate differences is essential for tax-efficient investment planning.

Tax Strategy

Strategies to Minimize Capital Gains Tax

Hold Investments for Over One Year

The simplest and most effective strategy is to hold investments for at least one year and one day before selling. This qualifies your gains for the lower long-term capital gains rates. If you are considering selling a profitable position that you have held for 10 or 11 months, it may be worth waiting until the one-year mark to reduce your tax liability significantly.

Tax-Loss Harvesting

Tax-loss harvesting involves selling investments that have declined in value to generate capital losses that offset your capital gains. For example, if you realize $20,000 in gains from selling one stock, you could sell another stock at a $15,000 loss to reduce your taxable gain to $5,000. Be aware of the wash-sale rule, which disallows the loss deduction if you repurchase the same or a substantially identical security within 30 days before or after the sale.

Use Tax-Advantaged Accounts

Investments held in tax-advantaged accounts such as 401(k)s, IRAs, and Roth IRAs are not subject to capital gains tax when you buy and sell within the account. Roth accounts offer the additional benefit that qualified withdrawals in retirement are completely tax-free. Holding your most actively traded or highest-growth investments in these accounts can shield significant gains from taxation.

Consider Specific Lot Identification

When you own multiple lots of the same investment purchased at different prices and times, you can choose which specific shares to sell. By selecting shares with the highest cost basis, you minimize the taxable gain on the sale. This requires notifying your broker to use specific identification rather than the default first-in, first-out method. This strategy works best when you have accumulated shares at varying prices over time.

Gift Appreciated Assets

Donating appreciated securities directly to a qualified charity allows you to avoid paying capital gains tax on the appreciation while also claiming a charitable deduction for the full market value. This can be significantly more tax-efficient than selling the investment, paying the capital gains tax, and donating the cash proceeds.

Disclaimer: This calculator provides estimates for educational purposes only and should not be considered tax advice. Tax laws are complex and change frequently. State tax rates shown are simplified top marginal rates and may not reflect your actual state tax liability. Consult a qualified tax professional or CPA for advice specific to your financial situation. The calculations do not account for deductions, credits, alternative minimum tax, or other factors that may affect your actual tax obligation.

FAQ

Frequently Asked Questions

You owe capital gains tax in the tax year that you sell or dispose of an asset at a profit. Simply holding an investment that has increased in value does not trigger a tax liability. The tax is due when you file your return for the year the sale occurred. If you expect to owe a significant amount, you may need to make quarterly estimated tax payments to avoid underpayment penalties.

Short-term capital gains apply to assets held for one year or less and are taxed at your ordinary income tax rate, which can be as high as 37%. Long-term capital gains apply to assets held for more than one year and are taxed at preferential rates of 0%, 15%, or 20% depending on your taxable income. The holding period begins the day after you purchase the asset and includes the day you sell it.

The NIIT is an additional 3.8% tax on net investment income for individuals with modified adjusted gross income above $200,000 (single) or $250,000 (married filing jointly). Net investment income includes capital gains, dividends, interest, rental income, and royalties. The tax applies to the lesser of your net investment income or the amount by which your MAGI exceeds the threshold. This means the NIIT can bring the maximum long-term capital gains rate to 23.8% for high earners.

Capital losses first offset capital gains of the same type (short-term losses offset short-term gains, long-term losses offset long-term gains). Any remaining net losses can then offset gains of the other type. If you still have a net capital loss after offsetting all gains, you can deduct up to $3,000 per year ($1,500 if married filing separately) against ordinary income such as wages or salary. Losses exceeding this annual limit carry forward to future tax years indefinitely.

Most states tax capital gains as ordinary income at their standard state income tax rates. However, several states have no income tax and therefore no capital gains tax, including Alaska, Florida, Nevada, New Hampshire (on earned income), South Dakota, Tennessee, Texas, Washington, and Wyoming. A few states offer preferential rates or exclusions for certain types of capital gains. The state tax is in addition to your federal capital gains tax, so your total effective rate on capital gains combines both federal and state taxes.

Related Calculators

Continue Learning

Start typing to search across all investment topics...

Request an AI summary of InvestmentBasic