Selling stocks for a profit can be exciting, but the tax bill may be larger than many investors expect. In the United States, the amount of capital gains tax you pay often depends on one important factor: how long you owned the investment before selling it.
The IRS generally divides stock profits into two categories: short-term capital gains and long-term capital gains. Short-term gains are taxed at ordinary income tax rates. By comparison, long-term gains may qualify for lower federal tax rates of 0%, 15%, or 20%, depending on your taxable income and filing status.
Understanding the difference can help you make more informed investment decisions, plan when to sell, and avoid unexpected tax liabilities. Moreover, knowing how capital losses, cost basis, and special tax rules work can help you report your investment activity correctly.
This guide explains how capital gains tax on stocks works in 2026, compares short-term and long-term rates, and provides practical examples for individual investors.
1. What Is Capital Gains Tax on Stocks?
Capital gains tax is a tax on the profit you make when you sell an investment for more than its adjusted cost basis.
For example, imagine you purchase shares of a company for $5,000 and later sell them for $7,000. Your capital gain is generally $2,000, before considering any adjustments or applicable transaction costs.
The basic formula is:
Capital Gain = Selling Price − Adjusted Cost Basis
Your cost basis usually starts with the amount you paid for the shares. However, certain transaction costs and other adjustments may affect the final figure.
Consider this example:
| Item | Amount |
|---|---|
| Original stock purchase | $5,000 |
| Selling price | $7,000 |
| Capital gain | $2,000 |
In this situation, you generally have a $2,000 capital gain to report.
Importantly, you do not normally owe capital gains tax simply because your stock increases in value while you continue holding it. Instead, a taxable capital gain generally occurs when you sell or otherwise dispose of the investment.
Therefore, investors should distinguish between an unrealized gain and a realized gain.
- Unrealized gain: Your investment has increased in value, but you have not sold it.
- Realized gain: You have sold the investment for more than its adjusted cost basis.
This distinction is especially important for long-term investors who hold stocks for several years.
2. Short-Term vs. Long-Term Capital Gains
The IRS classifies capital gains according to the investment’s holding period.
Generally, stocks held for one year or less produce short-term capital gains when sold at a profit. Conversely, investments held for more than one year generally produce long-term capital gains.
Here is a quick comparison:
| Feature | Short-Term Capital Gains | Long-Term Capital Gains |
|---|---|---|
| Holding period | One year or less | More than one year |
| Federal tax treatment | Ordinary income tax rates | Preferential capital gains rates may apply |
| Typical federal rates | Based on ordinary income brackets | 0%, 15%, or 20% for most gains |
| Common strategy | Short-term trading | Long-term investing |
| Tax advantage | Usually less favorable | Often more favorable |
The difference can have a meaningful effect on your after-tax investment return.
For instance, an investor who earns $10,000 from a stock sale may face a different federal tax bill depending on whether the shares were held for six months or eighteen months.
However, holding a stock longer does not automatically guarantee a lower tax rate. Your total taxable income, filing status, and other investment transactions also matter.
How Does the IRS Calculate the Holding Period?
The holding period generally begins the day after you acquire the shares and includes the day you sell them.
For example:
- Purchase date: January 10, 2025
- Sale date: January 10, 2026
- Holding period: One year or less for federal tax classification
- Tax category: Generally short-term
By contrast, selling on January 11, 2026, would generally meet the more-than-one-year requirement.
Consequently, investors should check the actual purchase and sale dates rather than relying on an approximate number of months.
When a sale is close to the one-year anniversary, even a single day can affect the tax classification.
3. 2026 Short-Term Capital Gains Tax Rates
Short-term capital gains are generally taxed as ordinary income. In other words, the gain is added to your taxable income and taxed under the applicable federal income tax brackets.
Unlike qualifying long-term gains, short-term gains do not receive the separate 0%, 15%, or 20% capital gains rate structure.
For example, if your applicable marginal federal income tax rate is 24%, an additional short-term gain may be taxed at that rate to the extent it falls within the 24% bracket.
Nevertheless, your entire income is not necessarily taxed at one rate. The United States uses a progressive tax system, meaning different portions of taxable income may fall into different tax brackets.
Example: Short-Term Stock Profit
Suppose you purchase shares for $8,000 and sell them six months later for $11,000.
Your profit is:
$11,000 − $8,000 = $3,000
Assume the additional taxable income falls entirely within your 24% marginal federal tax bracket.
The estimated federal tax attributable to that gain would be:
$3,000 × 24% = $720
This is a simplified illustration, not a complete tax calculation. Your actual liability may differ because of deductions, other income, capital losses, and additional taxes.
In addition, state income taxes may apply depending on where you live.
4. 2026 Long-Term Capital Gains Tax Rates
Long-term capital gains generally receive more favorable federal tax treatment.
For most individual investors, the federal long-term capital gains tax rates are:
- 0%
- 15%
- 20%
The applicable rate depends primarily on your taxable income and filing status.
The following are the 2026 federal long-term capital gains thresholds for most stock investments.
2026 Long-Term Capital Gains Tax Brackets
| Filing Status | 0% Rate | 15% Rate | 20% Rate |
|---|---|---|---|
| Single | Up to $49,450 | $49,451–$545,500 | Over $545,500 |
| Married Filing Jointly | Up to $98,900 | $98,901–$613,700 | Over $613,700 |
| Married Filing Separately | Up to $49,450 | $49,451–$306,850 | Over $306,850 |
| Head of Household | Up to $66,200 | $66,201–$579,600 | Over $579,600 |
These thresholds refer to taxable income, not gross salary.
For example, a single taxpayer earning $75,000 in wages does not necessarily have $75,000 in taxable income. Their taxable income may be lower after applicable deductions.
Furthermore, the 0% capital gains rate does not mean every investor with income below the threshold automatically pays no tax on every investment transaction. The taxpayer must qualify under the applicable rules, and other income and gains must be considered.
Example: Long-Term Stock Profit
Imagine a single taxpayer has taxable ordinary income of $40,000 and realizes a $15,000 long-term capital gain.
Their combined taxable income for this simplified example is $55,000.
The long-term capital gain may be divided between the 0% and 15% capital gains brackets. The portion that fits below the applicable 0% threshold may receive the 0% rate, while the remaining portion may be taxed at 15%.
Therefore, it is incorrect to assume that the entire $15,000 gain automatically receives one tax rate.
The actual calculation depends on the taxpayer’s complete tax return.
5. Short-Term vs. Long-Term Capital Gains: A Practical Example
Let’s compare two investors who earn the same $10,000 profit from selling stock.
Assume both investors are single taxpayers and the relevant income falls within the stated marginal tax brackets.
| Detail | Investor A | Investor B |
|---|---|---|
| Stock purchase price | $20,000 | $20,000 |
| Selling price | $30,000 | $30,000 |
| Investment profit | $10,000 | $10,000 |
| Holding period | 6 months | 2 years |
| Tax classification | Short-term | Long-term |
| Assumed applicable rate | 24% | 15% |
| Illustrative federal tax | $2,400 | $1,500 |
| Profit after illustrative tax | $7,600 | $8,500 |
In this hypothetical example, Investor B keeps $900 more after federal tax.
However, the comparison assumes the entire gain is taxed at the stated rate. Actual long-term capital gains calculations may involve multiple tax brackets, and short-term gains may cross ordinary income tax brackets.
Even so, the example demonstrates why holding periods matter.
For investors who regularly sell appreciated shares, understanding the tax consequences can make a meaningful difference over time.
6. How Capital Losses Can Reduce Your Tax Bill
Not every stock investment produces a profit. Fortunately, the tax rules generally allow investors to use eligible capital losses to offset capital gains.
A capital loss occurs when you sell an investment for less than its adjusted cost basis.
For example:
| Investment | Result |
|---|---|
| Stock A profit | +$5,000 |
| Stock B loss | -$2,000 |
| Net capital gain | $3,000 |
In this simplified example, the $2,000 loss reduces the $5,000 gain, leaving a net capital gain of $3,000.
However, the IRS has specific rules for combining short-term and long-term gains and losses.
Short-Term and Long-Term Losses
Capital gains and losses are generally separated into short-term and long-term categories before being combined under the applicable netting rules.
For example:
- Short-term gains are generally offset by short-term losses.
- Long-term gains are generally offset by long-term losses.
- Remaining net amounts are then combined according to IRS rules.
This matters because short-term and long-term gains can have different tax rates.
Therefore, selling an investment at a loss may have tax consequences beyond simply reducing your overall investment profit.
The $3,000 Capital Loss Deduction
If your total capital losses exceed your capital gains, you may generally deduct up to $3,000 of the remaining net capital loss against other income in a tax year.
For married taxpayers filing separately, the annual limit is generally $1,500.
Any eligible unused capital loss can generally be carried forward to future tax years.
For example, suppose you have:
- Capital gains: $2,000
- Capital losses: $8,000
- Net capital loss: $6,000
You may generally deduct $3,000 against other income for the year, assuming you qualify for the full deduction.
The remaining $3,000 may be carried forward to a future tax year.
As a result, keeping accurate records of previous capital losses is important when preparing your tax return.
7. What Is the Wash Sale Rule?
The wash sale rule is an important tax provision for investors who sell stocks at a loss and quickly buy similar investments again.
Generally, a wash sale occurs when you sell a security at a loss and acquire substantially identical securities within a 61-day window. This includes the 30 days before the sale, the day of the sale, and the 30 days after the sale.
When the rule applies, the loss is generally disallowed for the current tax deduction. Instead, the disallowed loss is generally added to the cost basis of the replacement shares.
Example of a Wash Sale
Imagine you purchase a stock for $5,000 and sell it for $4,000.
Your realized loss is $1,000.
However, you purchase substantially identical shares again within the wash sale period.
In that case, the $1,000 loss may be disallowed for the current tax year and added to the basis of the replacement investment.
Therefore, you cannot necessarily sell a losing investment, immediately repurchase it, and claim the loss as a current tax deduction.
Investors should also be careful when trading the same or substantially identical securities across multiple brokerage accounts or certain retirement accounts. Special rules can apply.
8. Does the Net Investment Income Tax Apply to Stock Profits?
Some higher-income taxpayers may owe an additional federal tax called the Net Investment Income Tax, or NIIT.
The NIIT is generally 3.8% and may apply to certain investment income, including capital gains.
For individuals, the tax generally applies when modified adjusted gross income exceeds these thresholds:
| Filing Status | NIIT Threshold |
|---|---|
| Single | $200,000 |
| Married Filing Jointly | $250,000 |
| Married Filing Separately | $125,000 |
| Qualifying Surviving Spouse | $250,000 |
The tax generally applies to the lesser of net investment income or the amount by which modified adjusted gross income exceeds the applicable threshold.
For example, a single taxpayer with modified adjusted gross income above $200,000 may owe NIIT on some or all of their qualifying investment income.
Importantly, the NIIT is separate from the regular capital gains tax.
Consequently, an investor who qualifies for the 15% long-term capital gains rate may still owe the additional 3.8% NIIT on applicable gains.
9. How to Calculate Your Capital Gains Tax
Calculating capital gains tax requires more than subtracting the purchase price from the sale price.
You should follow several steps to estimate your tax liability.
Step 1: Determine Your Adjusted Cost Basis
Start with the original purchase price.
Next, account for applicable adjustments, such as qualifying transaction costs or other basis adjustments.
For example:
- Purchase price: $10,000
- Eligible purchase costs: $20
- Adjusted cost basis: $10,020
The precise treatment of transaction costs depends on the transaction and applicable tax rules.
Step 2: Calculate Your Realized Gain or Loss
Subtract the adjusted cost basis from the selling proceeds.
For example:
- Selling proceeds: $13,000
- Adjusted cost basis: $10,020
- Capital gain: $2,980
Step 3: Determine the Holding Period
Check the original purchase date and the sale date.
If you held the shares for one year or less, the gain is generally short-term.
On the other hand, a holding period of more than one year generally qualifies as long-term.
Step 4: Combine Your Capital Gains and Losses
Review all stock sales and eligible investment transactions for the tax year.
Then, separate short-term and long-term transactions and apply the IRS netting rules.
Step 5: Apply the Appropriate Tax Rates
Short-term gains are generally taxed at ordinary income tax rates.
Meanwhile, qualifying long-term gains may receive the 0%, 15%, or 20% federal rate, depending on your taxable income and filing status.
Finally, consider whether NIIT or state income taxes may apply.
10. How to Report Stock Sales on Your Tax Return
Investors generally report taxable stock sales on their federal income tax returns.
Brokerage firms commonly provide Form 1099-B, which reports information about securities transactions.
This document may include:
- Date the stock was sold
- Sale proceeds
- Acquisition date, when available
- Cost basis, when reported
- Certain adjustments or transaction details
However, you should not assume that every figure on Form 1099-B is automatically complete or correct.
For example, some securities may have missing or incomplete cost basis information. In that situation, you may need to use your own transaction records.
Common Tax Forms
| Tax Form | Purpose |
|---|---|
| Form 1099-B | Reports proceeds from broker and barter exchange transactions |
| Form 8949 | Reports sales and other dispositions of capital assets |
| Schedule D | Summarizes capital gains and losses |
| Form 1040 | Individual federal income tax return |
In many cases, Form 8949 is used to report transaction details before the totals are transferred to Schedule D.
Additionally, taxpayers should review their brokerage statements, purchase confirmations, and records of any stock transfers.
Accurate documentation can help prevent reporting errors and reduce the risk of tax complications.
11. Do You Pay Capital Gains Tax Inside a 401(k) or IRA?
The tax treatment of investments can differ significantly depending on the account type.
For example, buying and selling stocks inside a taxable brokerage account generally creates taxable transactions when you realize gains.
By contrast, trading investments within certain tax-advantaged retirement accounts generally does not trigger an immediate capital gains tax each time you sell an investment.
Traditional IRA and 401(k)
Traditional retirement accounts generally offer tax-deferred growth.
In other words, investment gains and income inside the account generally are not taxed as capital gains when individual investments are sold within the account.
Instead, withdrawals are generally taxed under the applicable ordinary income rules, subject to the account’s distribution rules and any exceptions.
Roth IRA
Qualified Roth IRA distributions are generally tax-free if the applicable requirements are met.
As a result, eligible investors may benefit from tax-free investment growth and qualified withdrawals.
However, Roth IRA contributions, conversions, earnings, and withdrawals are subject to specific IRS rules.
The key distinction is that the tax treatment depends on the account structure, not simply on whether you held a stock for more than one year.
For investors choosing between taxable brokerage accounts and retirement accounts, this difference can influence long-term investment planning.
12. Strategies to Manage Capital Gains Tax on Stocks
Although investors cannot eliminate every tax obligation, several legitimate strategies may help manage the tax impact of stock sales.
1. Consider Holding Investments for More Than One Year
When an investment has appreciated, holding it for more than one year may allow the gain to qualify for long-term capital gains treatment.
Nevertheless, tax savings should not be the only reason to hold an investment.
If the company’s financial condition deteriorates or your investment thesis changes, delaying a sale purely for tax reasons may expose you to additional market risk.
2. Use Tax-Loss Harvesting Carefully
Tax-loss harvesting involves selling eligible investments at a loss to offset capital gains.
For example, an investor with $6,000 in realized gains and $2,000 in eligible realized losses may have a net capital gain of $4,000 before other adjustments.
However, the wash sale rule must be considered before repurchasing substantially identical securities.
3. Review Your Taxable Income Before Selling
Your total taxable income can affect the rate applied to long-term capital gains.
Therefore, reviewing your expected income before selling appreciated shares may help you understand the potential tax consequences.
In some circumstances, spreading sales across different tax years may be worth evaluating.
However, this approach should be balanced against investment risk, financial goals, and changes in tax law.
4. Choose Which Shares to Sell
Investors who purchased the same stock at different prices may have multiple tax lots.
Depending on the brokerage and applicable rules, you may be able to identify specific shares for sale.
For example, selling shares with a higher cost basis may result in a smaller realized gain than using a first-in, first-out method.
Consequently, investors should understand their brokerage’s cost-basis methods and make sure any specific-share identification is properly documented.
5. Use Tax-Advantaged Retirement Accounts
Retirement accounts such as traditional IRAs, Roth IRAs, and 401(k) plans can provide different tax advantages.
For long-term investors, these accounts may help reduce the impact of annual taxable investment transactions.
Nevertheless, contribution limits, eligibility requirements, withdrawal rules, and penalties must be considered.
13. Common Capital Gains Tax Mistakes Investors Should Avoid
Even experienced investors can make mistakes when reporting stock transactions.
Here are several issues worth checking before filing your taxes.
Mistake 1: Assuming every stock profit is taxed at 15%.
Short-term gains generally use ordinary income tax rates. Only qualifying long-term gains may receive the preferential capital gains rates.
Mistake 2: Selling before the one-year holding period ends.
A sale just one day too early can change a gain from long-term to short-term.
Mistake 3: Ignoring capital losses.
Eligible capital losses may reduce taxable gains. Therefore, overlooking losing positions can lead to an inaccurate tax calculation.
Mistake 4: Forgetting the wash sale rule.
A loss may not be deductible immediately if you repurchase substantially identical securities within the applicable period.
Mistake 5: Relying only on brokerage tax forms.
Although Form 1099-B is useful, investors should verify acquisition dates, cost basis, and other transaction information.
Mistake 6: Ignoring state taxes.
Federal capital gains rules are not the entire tax picture. Depending on your state, investment gains may also be subject to state income tax.
Mistake 7: Confusing retirement accounts with taxable brokerage accounts.
Selling stocks inside a traditional IRA or 401(k) generally does not create the same immediate tax treatment as selling stocks in a taxable brokerage account.
14. Frequently Asked Questions About Capital Gains Tax on Stocks
How long do I have to hold a stock to avoid short-term capital gains tax?
Generally, you must hold the stock for more than one year to qualify for long-term capital gains treatment. Holding it for exactly one year or less generally results in short-term classification.
Are long-term capital gains always taxed at 15%?
No. For most individual investors, qualifying long-term gains may be taxed at 0%, 15%, or 20%. The applicable rate depends on taxable income and filing status.
Can I pay 0% capital gains tax on stocks?
Yes, some taxpayers may qualify for the 0% federal long-term capital gains rate. However, eligibility depends on taxable income, filing status, and the applicable annual thresholds.
Do I pay taxes if I do not sell my stocks?
Generally, an increase in stock value does not create a realized capital gain until you sell or otherwise dispose of the investment. However, dividends and certain other investment income may be taxable even if you do not sell your shares.
Can stock losses offset stock gains?
Yes. Eligible capital losses generally offset capital gains under IRS netting rules. If total capital losses exceed capital gains, individuals may generally deduct up to $3,000 of the remaining net loss against other income, or $1,500 for married taxpayers filing separately.
Do I have to report stock sales if I lost money?
Generally, taxable brokerage stock sales should be reported even when they result in a loss. Reporting the transaction may allow you to claim an eligible capital loss.
Is day trading taxed differently from long-term investing?
The gains from ordinary stock trading held for one year or less are generally short-term capital gains and taxed at ordinary income tax rates. Special tax rules may apply to certain trading activities and elections, so not every active trader has an identical tax situation.
Does the IRS automatically know when I sell stocks?
Brokerage firms generally report certain securities transactions to the IRS and provide taxpayers with Form 1099-B. Nevertheless, investors remain responsible for accurately reporting their taxable transactions.
Are stock dividends taxed as capital gains?
Not necessarily. Qualified dividends generally receive the same preferential federal tax rates as long-term capital gains. Nonqualified dividends are generally taxed at ordinary income tax rates. Dividend taxation is separate from the tax treatment of a profit realized when selling shares.
Do I owe capital gains tax when transferring stocks to another brokerage?
A properly completed transfer of stock between brokerage accounts generally does not create a taxable sale by itself. However, selling shares during the transfer process or making other transactions may have tax consequences.
15. Final Thoughts: Understand the Tax Before You Sell
Capital gains tax is an important part of successful stock investing. Although market performance determines how much your investment grows, tax treatment affects how much of that profit you ultimately keep.
The most important distinction is the holding period. Short-term capital gains are generally taxed at ordinary income tax rates, while qualifying long-term gains may receive lower federal rates.
In addition, capital losses, wash sale rules, retirement accounts, and the Net Investment Income Tax can all influence your final tax bill.
For that reason, investors should review their holding periods, cost basis, expected taxable income, and potential tax obligations before selling appreciated shares.
Ultimately, a good investment strategy should consider both market returns and after-tax returns. By understanding the rules and keeping accurate records, you can make more informed decisions and manage your investment taxes more effectively.
Sources
- IRS Topic No. 409 – Capital Gains and Losses: https://www.irs.gov/taxtopics/tc409
- IRS Publication 550 – Investment Income and Expenses: https://www.irs.gov/publications/p550
- IRS Publication 505 – Tax Withholding and Estimated Tax: https://www.irs.gov/publications/p505
- IRS Form 8949 – Sales and Other Dispositions of Capital Assets: https://www.irs.gov/forms-pubs/about-form-8949
- IRS Schedule D – Capital Gains and Losses: https://www.irs.gov/forms-pubs/about-schedule-d-form-1040
- IRS Net Investment Income Tax: https://www.irs.gov/newsroom/questions-and-answers-on-the-net-investment-income-tax
Disclaimer
The information provided by FeeAsset is for general informational and educational purposes only and does not constitute financial, investment, legal, tax, or insurance advice. It should not replace advice from a qualified professional who understands your individual circumstances.
We make reasonable efforts to provide accurate and up-to-date information, but we make no representations or warranties regarding the completeness, accuracy, reliability, or suitability of the information on this website. Laws, regulations, rates, fees, and financial products may change over time and may vary by state or jurisdiction.
FeeAsset does not provide individualized financial, investment, legal, tax, or insurance advice. Unless expressly stated otherwise, FeeAsset is not acting as a licensed financial adviser, broker-dealer, insurance agency, or other regulated professional service provider.
Any decisions you make based on information from this website are your responsibility. To the fullest extent permitted by applicable law, FeeAsset disclaims liability for losses or damages arising from the use of, or reliance on, this website’s information, tools, or resources.
Before making financial decisions, consult a qualified professional who is appropriately licensed or authorized in your jurisdiction and can assess your individual needs and circumstances.