Long-Term Capital Gains Tax: The 0%, 15%, and 20% Rates Explained
Most U.S. long-term capital gains are taxed federally at 0%, 15%, or 20%. Your taxable income and filing status determine which rates apply, and a single sale can span more than one rate. Start by calculating your gain and checking how long you held the asset.

Try our free Federal Income Tax Calculator to calculate your calculated 2026 federal tax using wages, investment gains, and filing status.
1. Calculate the gain before looking up the rate
A capital gain generally happens when you sell or otherwise dispose of a capital asset for more than its adjusted basis. Start with the amount you realized, usually the selling price less eligible selling expenses. Then subtract the adjusted basis. For an ordinary purchase, the original price and eligible acquisition costs are the starting point for basis. Gifts, inheritances and some corporate actions can change the calculation. IRS overview of capital gains and losses
Suppose you buy shares for $8,400 and pay $20 in acquisition costs. Your basis starts at $8,420. You later sell the same shares for $11,500 and pay $25 in selling costs, leaving $11,475 in net proceeds. That produces a $3,055 gain before any adjustments or capital losses. If the entire $3,055 falls in the 15% bracket, the regular federal tax on that gain is $458.25.
If you purchased shares in multiple batches, match the proceeds to the shares actually sold. The account’s average purchase price may differ from the basis of those shares. Use your trade confirmations and the broker’s lot records to reconcile the sale, especially after an account transfer. IRS Publication 550
Cover photo by Ryan Schwark via Wikimedia Commons, CC0.
Capital gain or loss = amount realized − adjusted basis
2. Check whether the sale is long-term or short-term
An investment generally qualifies for long-term treatment if you hold it for more than one year. If you held it for one year or less, the gain is generally short-term. Net short-term gains generally use ordinary income rates. For exchange-traded securities, count from the day after the purchase trade date through the sale trade date. IRS holding period guidance
For example, shares bought on October 14, 2025 and sold on October 14, 2026 generally produce a short-term gain or loss. A sale on October 15, 2026 is generally long-term. For a sale near the end of December, the trade date also generally determines the year you report an exchange-traded stock sale, even if the cash settles in January.
Every purchase can start a different holding period. Shares bought with reinvested dividends have their own purchase dates, so selling an entire position can produce both long-term and short-term results. Check the acquisition date for each lot before using a single rate for the whole sale.
3. Compare the 2026 and 2027 long-term capital gains brackets
The table shows the top of the 0% and 15% federal bands by filing status. The 20% band starts above the 15% ceiling. Use taxable income after applicable deductions, including the eligible gain when determining where each portion lands. The thresholds are separate from the ordinary income tax brackets. IRS 2026 thresholds · IRS 2027 thresholds
Use the year of the sale. For a calendar-year filer, gains realized during 2026 go on the 2026 return, usually filed in 2027. Gains realized during 2027 use the 2027 thresholds, even though the return is generally filed in 2028.
| Filing status | 2026 top of 0% | 2026 top of 15% | 2027 top of 0% | 2027 top of 15% |
|---|---|---|---|---|
| Single | $49,450 | $545,500 | $51,050 | $563,200 |
| Married filing jointly or qualifying surviving spouse | $98,900 | $613,700 | $102,100 | $633,600 |
| Married filing separately | $49,450 | $306,850 | $51,050 | $316,800 |
| Head of household | $66,200 | $579,600 | $68,350 | $598,400 |
4. See how one sale can be taxed at two rates
Think of ordinary taxable income as filling the space below your gain. For a simplified example, assume you file single in 2027, earn $62,600 in taxable wages, take the $16,600 standard deduction and have no other adjustments. That leaves $46,000 in ordinary taxable income. You also realize $12,000 in net long-term gains eligible for the standard rates. With no qualified dividends or special-rate gains, total taxable income is $58,000. IRS 2027 standard deduction
The 0% band ends at $51,050, leaving $5,050 of room above the $46,000 in ordinary taxable income. The first $5,050 of your gain uses the 0% rate. The remaining $6,950 uses 15%, so the regular federal tax on the gain is $1,042.50. The $46,000 still uses ordinary rates. IRS Schedule D instructions
The top threshold works the same way. Say a single filer in 2027 has $560,000 of ordinary taxable income and $10,000 of eligible net long-term gains. The first $3,200 of gains fits below the $563,200 ceiling for 15%, and $6,800 falls in the 20% band. Regular federal tax on the gain comes to $1,840 before considering any separate investment tax. IRS 2027 thresholds
Qualified dividends can also use the preferential rates. Add $2,000 of qualified dividends to the first example, holding the $46,000 of ordinary taxable income steady. The pool eligible for preferential rates rises to $14,000, while the 0% space stays $5,050. That leaves $8,950 at 15%, increasing the combined regular federal tax on the qualified dividends and eligible gain to $1,342.50. Use the worksheet for your filing year if your return includes dividends or other kinds of capital gains. Percentio guide to marginal and effective rates
| Portion of the $12,000 gain | Federal rate | Tax on this portion |
|---|---|---|
| $5,050 | 0% | $0.00 |
| $6,950 | 15% | $1,042.50 |
| Total | $1,042.50 |
5. Compare the gain from different purchase lots
Two batches of the same stock can give you different gains on the same sale. Suppose you bought 50 shares for $40 apiece two years ago and 50 more for $70 apiece six months ago. You now need to sell 50 shares at $80 each. Either lot would generate $4,000 in proceeds before fees, but the basis and holding period differ.
The older shares have a $2,000 basis and would produce a $2,000 long-term gain. At an assumed 15% rate on the full gain, that is $300 in regular federal tax. The newer shares have a $3,500 basis and would produce a $500 short-term gain. At an assumed 22% ordinary rate on the full gain, that is $110. This example excludes other losses, taxes and fees. The longer holding period gets a lower rate, while the higher-basis lot produces a smaller gain and a lower dollar tax in this sale.
If you want to sell a particular lot, check whether your broker supports specific identification and how to confirm which shares were sold. First in, first out generally applies to stock if you cannot adequately identify the shares sold. Some funds have separate average-basis rules. Retain the confirmation before using the chosen lot in your calculation. IRS stock basis and identification rules
6. Know which events turn an increase in value into a gain
When shares appreciate in a taxable brokerage account, that price increase is generally unrealized while you own them. A sale or other taxable disposition generally turns the change in value into a gain or loss. If you sell shares and immediately reinvest the proceeds, the sale still generally goes on the return for that year.
Digital asset transactions can create a gain without a withdrawal to your bank. Selling crypto for dollars, exchanging it for another digital asset, or using it to buy goods can each trigger a gain or loss. Keep the acquisition date, adjusted basis and dollar value of what you received at the time of each disposition. IRS digital asset transaction FAQs
Suppose you exchange a digital asset you bought for $2,300 for another asset worth $3,600 at the time of the trade. Ignoring transaction costs, the first asset produces a $1,300 gain. If you held that asset for more than a year, the gain is generally long-term. The asset received generally starts with a basis of $3,600 and a new holding period. Save the dollar values for both sides of the trade.
A mutual fund can distribute a capital gain even while you keep your fund shares. Reinvesting that distribution may buy a new lot. Record its purchase cost so you can calculate basis when you later sell those shares. The examples here describe taxable accounts. Retirement accounts have separate rules for contributions, investments and withdrawals. IRS investment income guidance
7. Account for capital losses before calculating tax
Combine the year’s capital gains and losses using Schedule D. Short-term and long-term transactions are first totaled separately. If one side has a net loss and the other has a net gain, the loss can generally offset part or all of that gain. For instance, $7,000 in long-term gains and $2,500 in deductible long-term losses leave $4,500 in net long-term gains before considering other transactions.
If you end the year with a net capital loss, you can generally deduct up to $3,000 against other income, or up to $1,500 if married filing separately. An unused loss can generally carry forward to later years. Bring any prior-year carryover into the calculation before assuming the whole new gain will be taxable. IRS capital loss rules
For stocks and securities, a wash sale can disallow a loss if you acquire substantially identical stock or securities within 30 days before or after selling at a loss. Check automatic purchases, such as dividend reinvestments, when reviewing transactions around the sale. A decline in the value of a personal-use asset such as your car generally does not produce a deductible capital loss. IRS Publication 550
8. Check for the 3.8% investment tax and special rates
The federal Net Investment Income Tax is 3.8% of the smaller of two amounts: your net investment income or how much your modified adjusted gross income exceeds your filing threshold. The threshold is $200,000 for single filers and heads of household, $250,000 for married couples filing jointly and qualifying surviving spouses, and $125,000 for married people filing separately. IRS Net Investment Income Tax guidance
For example, a single filer with $215,000 of modified adjusted gross income and $25,000 of net investment income is $15,000 over the threshold. The smaller amount is $15,000, so the tax is $570. The 3.8% calculation uses a different income measure from the taxable income used for the regular capital gains rate.
Some assets have different rate rules. Certain long-term gains on collectibles can face a maximum 28% rate, and unrecaptured Section 1250 gain on depreciable real estate can face a maximum 25% rate. For your main home, you may be able to exclude up to $250,000 of gain, or up to $500,000 on a qualifying joint return. Eligibility depends on ownership, use and other rules. IRS capital gains exceptions · IRS home sale exclusion
Check state tax separately. State treatment can differ from the federal rules, and even a 0% federal rate does not tell you what your state will charge. If a sale and an interstate move fall in the same year, check where the income is taxable before assuming a new address changes the result. State income tax guide
9. Review the tax lots, records, and return before filing
Start with each lot’s purchase and sale records, then compare them with the tax documents your broker provides. For stock transactions that may be Form 1099-B, and for digital asset sales it may be Form 1099-DA. A broker statement can omit basis or an adjustment. If you transferred the investment between accounts, look for the original confirmation and check which tax lot the broker used.
Most sales can be listed on Form 8949, with totals carried to Schedule D. Some transactions can be summarized directly on Schedule D under the IRS instructions. A gain that qualifies for the 0% rate is generally still reportable. Keep the records that support your proceeds, basis, holding period and adjustments. IRS Form 8949 instructions · IRS Schedule D
If you are comparing two possible sale years, calculate taxable income and available losses for each year. A bonus, qualified dividends, or a separate sale can use up space in a lower rate band. A sale closer to a holding-period cutoff can change the gain classification. Compare the tax effect with the investment risk of holding longer. For a large realized gain, check whether your withholding or calculated payments need to change. IRS calculated taxes guidance
Keep exploring Percentio
Browse the full directory to find related calculators and compare the assumptions that matter to your situation.
Browse all financial calculators →Questions and answers
Practical answers to common planning questions.



