This capital gains tax calculator estimates the federal tax on an investment you sold in 2026 or plan to sell in 2027. Enter your gain, how long you owned the asset, your other income and your filing status. The calculator splits the gain across the 0%, 15% and 20% long-term rates, adds the 3.8% net investment income tax when it applies, and shows how much of the profit you keep.
The 2027 figures come from the inflation adjustments the IRS released on November 5, 2026. For every rate table in one place, see our capital gains tax brackets for both years.
- Long-term gains are taxed at 0% up to $49,450 of taxable income for single filers in 2026 and $98,900 for married couples filing jointly. Those ceilings rise to $51,050 and $102,100 for 2027.
- A gain is not taxed at one rate. It stacks on top of your other income, so part of one sale can land at 0% and the rest at 15%.
- Short-term gains on assets held one year or less are taxed like wages, at rates from 10% to 37%.
The calculator needs JavaScript to run. The rate tables below show how to estimate the tax by hand.
How Does The Capital Gains Tax Calculator Work?
The calculator places your gain on top of your other income for the year and applies the federal rate that covers each dollar of the gain. It needs five inputs, and the result updates as you type.
| Input | What It Means |
|---|---|
| Tax Year | The year of the sale. Pick 2026 for sales this year and 2027 for sales you are planning. |
| Capital Gain | Your profit: the sale price minus what you paid, including commissions and fees. |
| How Long You Owned It | Long-term means more than one year. Short-term means one year or less. |
| Other Income | Wages, business income and interest for the year, without the gain. |
| Filing Status | Single, married filing jointly, head of household or married filing separately. |
If you only know your salary, leave the income menu on “Before deductions” and the calculator subtracts the standard deduction, which is $16,100 for single filers and $32,200 for married couples filing jointly in 2026. Switch the menu to “Taxable income, after deductions” if you itemize or already have your taxable income from a tax return or tax software.
Two optional sections sit under the main inputs. The first works out your gain from a purchase price, a sale price and your selling costs. The second adds a state tax rate so the total covers your federal and state returns.
How Is Capital Gains Tax Calculated?
Capital gains tax is calculated by stacking the gain on top of your other taxable income. Your wages fill the lower brackets first, and each layer of the gain is taxed at the rate that applies at that level of income. One sale can be taxed at two rates.
Take a single filer in 2026 with a $60,000 salary and a $20,000 long-term gain. After the $16,100 standard deduction, taxable income before the gain is $43,900. The 0% rate runs to $49,450, which leaves $5,550 of room before the 15% rate starts.
| Step | Amount |
|---|---|
| Salary | $60,000 |
| Standard Deduction | – $16,100 |
| Taxable Income Before The Gain | $43,900 |
| Room Left In The 0% Bracket | $49,450 – $43,900 = $5,550 |
| Gain Taxed At 0% | $5,550 × 0% = $0 |
| Gain Taxed At 15% | $14,450 × 15% = $2,167.50 |
| Federal Tax On The Gain | $2,167.50 |
The same gain taxed at a flat 15% would cost $3,000. Stacking saves this filer $832.50, which is why the calculator asks for your other income before it gives you a number.
A long-term gain never pushes your salary into a higher bracket. Wages are taxed first at the ordinary rates in the federal income tax brackets, and the gain sits on top with its own rate schedule.
What Are The Long-Term Capital Gains Tax Rates For 2026 And 2027?
Long-term capital gains are taxed at 0%, 15% or 20%, based on your taxable income and filing status. For 2026, the 0% rate covers taxable income up to $49,450 for single filers and $98,900 for married couples filing jointly. The 2027 thresholds are about 3.2% higher.
| Tax Rate | Single | Married Filing Jointly | Head Of Household | Married Filing Separately |
|---|---|---|---|---|
| 0% | $0 – $49,450 | $0 – $98,900 | $0 – $66,200 | $0 – $49,450 |
| 15% | $49,451 – $545,500 | $98,901 – $613,700 | $66,201 – $579,600 | $49,451 – $306,850 |
| 20% | $545,501+ | $613,701+ | $579,601+ | $306,851+ |
| Tax Rate | Single | Married Filing Jointly | Head Of Household | Married Filing Separately |
|---|---|---|---|---|
| 0% | $0 – $51,050 | $0 – $102,100 | $0 – $68,350 | $0 – $51,050 |
| 15% | $51,051 – $563,200 | $102,101 – $633,600 | $68,351 – $598,400 | $51,051 – $316,800 |
| 20% | $563,201+ | $633,601+ | $598,401+ | $316,801+ |
These rates apply to assets you owned for more than one year and to qualified dividends. The 2026 thresholds come from IRS Revenue Procedure 2025-32, and the 2027 thresholds come from Revenue Procedure 2026-35.
How Are Short-Term Capital Gains Taxed?
Short-term capital gains are taxed as ordinary income, at the same 10% to 37% rates as wages. A gain is short-term when you owned the asset for one year or less. IRS Publication 550 starts the count the day after you buy and includes the day you sell, so a stock bought on January 31 turns long-term with a sale on February 1 of the next year.
Selling early costs more at every income level. This table runs the same $20,000 gain through both sets of rates for a single filer who takes the standard deduction in 2026, and waiting saves between $1,400 and $4,000.
| Salary | Short-Term Tax | Long-Term Tax | Saved By Waiting |
|---|---|---|---|
| $40,000 | $2,400 | $0 | $2,400 |
| $60,000 | $3,750 | $2,167.50 | $1,582.50 |
| $100,000 | $4,400 | $3,000 | $1,400 |
| $200,000 | $4,970 | $3,000 | $1,970 |
| $400,000 | $7,000 | $3,000 | $4,000 |
Use the Long-Term and Short-Term buttons in the calculator to run your own numbers. The note under the results shows the difference in dollars, which tells you what a few more weeks of waiting is worth.
How Much Long-Term Gain Can You Take At The 0% Rate?
A single filer with no other income can realize up to $65,550 of long-term gains in 2026 and owe no federal tax. That figure is the $49,450 ceiling for the 0% rate plus the $16,100 standard deduction. For a married couple filing jointly, the 2026 figure is $131,100.
| Filing Status | 2026 Taxable Income | 2026 With Standard Deduction | 2027 Taxable Income | 2027 With Standard Deduction |
|---|---|---|---|---|
| Single | $49,450 | $65,550 | $51,050 | $67,650 |
| Married Filing Jointly | $98,900 | $131,100 | $102,100 | $135,300 |
| Head Of Household | $66,200 | $90,350 | $68,350 | $93,275 |
| Married Filing Separately | $49,450 | $65,550 | $51,050 | $67,650 |
Every dollar of other income uses up part of that room. Retirees and people between jobs can sell appreciated investments in a low-income year and reset their cost basis at no federal tax, a move called tax-gain harvesting. Our overview of how taxes affect investing covers where this fits in a larger plan.
College students should check one rule before trying this. The kiddie tax applies to full-time students under age 24 who do not earn more than half of their own support, and it taxes their investment income above a small annual threshold at the parents’ rate.
What Is The 3.8% Net Investment Income Tax?
The net investment income tax is a 3.8% federal tax on investment income, including capital gains, for higher earners. It applies when modified adjusted gross income is over $200,000 for single filers and heads of household, $250,000 for married couples filing jointly, or $125,000 for married couples filing separately. The IRS charges the tax on the smaller of your net investment income or the amount over the threshold.
Those thresholds are written into the law and do not rise with inflation, so they are the same for 2026 and 2027. A single filer with $150,000 in wages and a $100,000 long-term gain has $250,000 of income, which is $50,000 over the line. The 3.8% tax on that $50,000 adds $1,900 to the $15,000 of regular capital gains tax.
The calculator estimates this tax from the income you enter plus the gain. It treats the gain as your only net investment income, so the estimate runs low if you also have large dividends or rental income.
Do You Pay State Tax On Capital Gains?
Most states tax capital gains as regular income, at the same rates as wages. Eight states have no income tax on wages or investment gains: Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas and Wyoming. Washington has no income tax either, but it charges an excise tax that starts at 7% on long-term gains above a standard deduction, which the Washington Department of Revenue set at $278,000 for 2025.
Missouri went the other direction. Since tax year 2025, Missouri law lets individuals subtract 100% of their federal capital gains from state income. California sits at the high end, taxing gains as ordinary income at rates up to 13.3%, which brings the top combined rate on a long-term gain to 37.1% with the 20% federal rate and the 3.8% net investment income tax.
To include state tax, open “Add State Tax” in the calculator and enter your rate. You can find it in our rundown of state income tax rates.
Which Gains Follow Different Rules?
A few asset types do not use the 0%, 15% and 20% schedule, and this calculator does not apply their special rates. IRS Topic 409 lists the exceptions.
| Asset | Federal Rule |
|---|---|
| Collectibles | Long-term gains on coins, art and precious metals are taxed at a maximum rate of 28%. |
| Rental And Business Real Estate | The part of the gain that comes from past depreciation is taxed at a maximum rate of 25%. |
| Your Main Home | Up to $250,000 of gain is excluded, or $500,000 on a joint return, if you owned and lived in the home for two of the last five years. |
| Qualified Small Business Stock | The taxable part of the gain is taxed at a maximum rate of 28%. |
| Retirement Accounts | Sales inside a 401(k) or an IRA are not taxed as capital gains. |
Stocks, ETFs, mutual funds and crypto all use the standard rates, so the calculator works for them. For a home sale, subtract the home sale exclusion first and enter only the gain above it.
How Can You Lower Your Capital Gains Tax?
The largest savings come from timing: when you sell, and what else you sell in the same year. Run each idea through the calculator before you place the trade.
- Cross the one-year mark. Long-term rates start the day after the one-year anniversary of your purchase. For a single filer with a $100,000 salary, waiting saves $1,400 on a $20,000 gain in 2026.
- Harvest losses. Losses offset gains dollar for dollar, and up to $3,000 of leftover loss offsets other income each year. Our walkthrough on tax-loss harvesting covers the steps.
- Sell in a low-income year. Gains realized while your taxable income is under the 0% ceiling cost nothing in federal tax. A year with a job change, a sabbatical or the start of retirement is the time to look.
- Give appreciated shares instead of cash. Donating stock you held more than one year to a charity or a donor-advised fund means nobody pays tax on the gain. You can still deduct the gift if you itemize.
- Use tax-advantaged accounts. Sales inside a 401(k), an IRA or a 529 plan do not create capital gains tax, which makes those accounts the place for funds you trade or rebalance.
When Do You Pay Capital Gains Tax?
Capital gains tax is due with the tax return for the year of the sale. Gains from 2026 sales go on the return due April 15, 2027, and gains from 2027 sales go on the return due in April 2028. You list each sale on Form 8949 and total the results on Schedule D.
A large gain can also call for an estimated tax payment during the year, because no tax is withheld from a brokerage sale. IRS Topic 306 says most taxpayers avoid the underpayment penalty when withholding and estimated payments cover at least 90% of this year’s tax or 100% of last year’s tax, with a stricter test for higher incomes. Our walkthrough on paying quarterly estimated taxes shows how to send one.
What Does The Calculator Leave Out?
The calculator estimates federal tax on one net gain using the published 2026 and 2027 brackets. It does not net several gains and losses against each other, apply the special rates for collectibles and real estate depreciation, or calculate the alternative minimum tax. A gain also raises your adjusted gross income, which can shrink income-based credits and deductions.
Treat the result as a planning estimate, not tax advice. For a large sale, confirm the number in one of our picks for the best tax software or with a tax professional.
For the tax on your paycheck instead of your portfolio, use our income tax calculator, which covers federal, state and local taxes for both years.
Capital Gains Tax Calculator FAQs
How Much Is Capital Gains Tax On $50,000?
The tax on a $50,000 gain depends on your other income and filing status. A single filer with a $60,000 salary owes $6,667.50 in federal tax on a $50,000 long-term gain in 2026. The same gain is free of federal tax for a single filer with no other income.
Is The Whole Gain Taxed At One Rate?
No. The gain stacks on top of your other taxable income, and each layer is taxed at the rate for that level of income. A single sale can be split between the 0% and 15% rates, or between 15% and 20%.
Does A Capital Gain Push My Salary Into A Higher Tax Bracket?
No. Your wages are taxed first, and a gain never changes the tax on them. A short-term gain is added on top of your wages, so part of the gain itself can land in a higher ordinary bracket.
How Long Do I Have To Hold An Investment For Long-Term Rates?
You need to own the investment for more than one year. The count starts the day after the trade date of your purchase and includes the day you sell. A sale exactly one year after the purchase date is still short-term.
Do I Pay Capital Gains Tax If I Reinvest The Money?
Yes. Selling in a taxable brokerage account triggers the tax even if you buy another investment the same day. Sales inside a 401(k), an IRA or a 529 plan are the exception.
Can Capital Losses Offset My Gains?
Yes. Losses offset gains first, and up to $3,000 of leftover loss, or $1,500 if married filing separately, offsets other income each year. Unused losses carry forward to later years. The wash sale rule cancels a loss if you buy the same investment back within 30 days.
Does The Calculator Work For Crypto?
Yes. The IRS treats crypto as property, so sales and trades use the same short-term and long-term rates as stocks. Each sale is reported on Form 8949, and our walkthrough on attaching a crypto Form 8949 shows how to file a long list of trades.
Which Tax Year Should I Pick?
Pick the year of the sale. A trade dated December 31, 2026 belongs to 2026, even though the cash settles in January. Choose 2027 to plan a sale you have not made yet.
Editor: Colin Graves
