Capital Gains Tax on Stocks: Short-Term vs Long-Term Rates (2025‑2026)
When you sell a stock for more than you paid for it, the profit is called a capital gain — and the IRS expects a share of it. Understanding how capital gains taxes work is one of the most practically important areas of financial literacy for any US investor. The rate you pay depends on how long you owned the asset, your total income, your filing status, the state you live in, and whether additional surtaxes apply. This guide covers the full picture as of the 2025 tax year.
Estimate Your Capital Gains Tax
Use our free calculator to model short-term and long-term scenarios, including NIIT, before you file.
In this article
- What is Capital Gains Tax?
- Short-Term vs Long-Term Capital Gains
- 2025-2026 Federal Capital Gains Tax Rates
- Net Investment Income Tax (NIIT)
- State Capital Gains Taxes
- How to Calculate Your Capital Gains
- The Wash Sale Rule
- Tax-Loss Harvesting
- Reporting Capital Gains on Your Tax Return
- Capital Gains in Retirement Accounts
- Gifting Stock and Inherited Stock
- Frequently Asked Questions
What is Capital Gains Tax?
A capital gain arises when you dispose of a capital asset — such as shares of stock, an ETF, or a mutual fund — for more than your cost basis (essentially, what you paid for it). The difference between your proceeds and your cost basis is the gain, and the IRS taxes it in the year the gain is realized (i.e., when you actually dispose of the shares).
There are two broad categories of capital gains under US federal tax law:
- Short-term capital gains — from assets held for one year or less before being sold. These are taxed at ordinary income tax rates, the same rates that apply to wages and salaries.
- Long-term capital gains — from assets held for more than one year before being sold. These receive preferential (lower) tax rates under current law, designed to encourage longer investment horizons.
Capital losses — when you sell at a price below your cost basis — can be used to offset capital gains and, within limits, ordinary income. Understanding both sides of the ledger is essential for year-end tax planning. To learn more about what stocks are and how they are traded, see our article on What is a Stock?
Short-Term vs Long-Term Capital Gains
The single most important factor in determining your capital gains tax rate is the holding period — how long you owned the asset from the date of purchase to the date of sale.
Short-Term Capital Gains (Held 1 Year or Less)
If you sell stock within one year of the purchase date (including the day of purchase), the gain is short-term and taxed as ordinary income. For the 2025 tax year, ordinary income tax brackets range from 10% to 37% depending on your taxable income and filing status.
Long-Term Capital Gains (Held More Than One Year)
If you hold the stock for more than one year before selling, the gain qualifies for preferential long-term capital gains rates of 0%, 15%, or 20% — significantly lower than ordinary income rates for most taxpayers. This difference can be substantial for investors in higher income brackets.
The holding period begins on the day after the purchase date and ends on the date of sale. For inherited stock, special rules apply — discussed in the Gifting and Inherited Stock section below.
2025‑2026 Federal Capital Gains Tax Rates
The tables below show approximate federal income thresholds and applicable rates as of the 2025 tax year. These figures are subject to annual inflation adjustments by the IRS — always verify current thresholds at IRS.gov or with a qualified tax professional. The short-term rates are the standard 2025 ordinary income tax brackets.
Short-Term Capital Gains Rates (Ordinary Income Brackets — 2025)
| Rate | Single Filers | Married Filing Jointly | Head of Household | Married Filing Separately |
|---|---|---|---|---|
| 10% | Up to $11,925 | Up to $23,850 | Up to $17,000 | Up to $11,925 |
| 12% | $11,926 – $48,475 | $23,851 – $96,950 | $17,001 – $64,850 | $11,926 – $48,475 |
| 22% | $48,476 – $103,350 | $96,951 – $206,700 | $64,851 – $103,350 | $48,476 – $103,350 |
| 24% | $103,351 – $197,300 | $206,701 – $394,600 | $103,351 – $197,300 | $103,351 – $197,300 |
| 32% | $197,301 – $250,525 | $394,601 – $501,050 | $197,301 – $250,500 | $197,301 – $250,525 |
| 35% | $250,526 – $626,350 | $501,051 – $751,600 | $250,501 – $626,350 | $250,526 – $375,800 |
| 37% | Over $626,350 | Over $751,600 | Over $626,350 | Over $375,800 |
Long-Term Capital Gains Rates (2025)
| Rate | Single Filers | Married Filing Jointly | Head of Household | Married Filing Separately |
|---|---|---|---|---|
| 0% | Up to $48,350 | Up to $96,700 | Up to $64,750 | Up to $48,350 |
| 15% | $48,351 – $533,400 | $96,701 – $600,050 | $64,751 – $566,700 | $48,351 – $300,000 |
| 20% | Over $533,400 | Over $600,050 | Over $566,700 | Over $300,000 |
Net Investment Income Tax (NIIT)
In addition to regular federal capital gains tax, certain higher-income investors are subject to the Net Investment Income Tax (NIIT) — a 3.8% Medicare surtax introduced under the Affordable Care Act. This tax applies on top of (not instead of) regular capital gains tax.
As of the 2025 tax year, the NIIT applies to the lesser of your net investment income or the amount by which your Modified Adjusted Gross Income (MAGI) exceeds the following thresholds (these thresholds are not adjusted for inflation):
- Single filers: MAGI over $200,000
- Married filing jointly: MAGI over $250,000
- Married filing separately: MAGI over $125,000
- Head of household: MAGI over $200,000
Net investment income generally includes capital gains, dividends, interest income, rental income (unless derived from an active business), and income from passive activities.
High-income investors nearing the NIIT thresholds may benefit from consulting a qualified tax professional about strategies such as deferring gains to a lower-income year or maximizing contributions to tax-advantaged retirement accounts that reduce MAGI.
State Capital Gains Taxes
Federal tax is only part of the story. Most US states also tax capital gains, and the combined federal + state burden can be substantial depending on where you live.
States With No Income Tax (and Therefore No Capital Gains Tax)
As of 2025, the following states impose no state income tax on wages or investment income: Texas, Florida, Nevada, Washington*, Wyoming, South Dakota, Alaska, New Hampshire (taxes only dividends and interest, being phased out), and Tennessee (phased out investment income tax as of 2021). Residents of these states generally owe only federal tax on capital gains from stock sales.
* Washington state enacted a 7% capital gains tax on long-term gains above $250,000 (upheld by the state Supreme Court in 2023).
High-Tax States
Many high-tax states treat capital gains as ordinary income with no preferential rate. Notable examples include:
| State | Top Marginal Rate on Capital Gains | Notes |
|---|---|---|
| California | 13.3% | Taxed as ordinary income; no preferential long-term rate |
| New York | 10.9% | Taxed as ordinary income; NYC adds additional local tax |
| New Jersey | 10.75% | Taxed as ordinary income |
| Oregon | 9.9% | Taxed as ordinary income |
| Minnesota | 9.85% | Taxed as ordinary income |
| Massachusetts | 5.0% | 12% rate applies to short-term gains; 5% for long-term |
| Wisconsin | 7.65% | 30% exclusion for certain long-term gains |
How to Calculate Your Capital Gains
The formula for a capital gain is straightforward:
What is Cost Basis?
Your cost basis is generally what you paid for the shares, including any commissions or fees paid to acquire them. If you purchased 50 shares at $40 each and paid a $10 commission, your total cost basis is $2,010, or $40.20 per share. Cost basis must be tracked carefully, especially when you make multiple purchases of the same stock at different prices over time.
Cost Basis Methods
When you have multiple lots of the same stock purchased at different times and prices, the IRS allows several methods to determine which shares are deemed sold:
- Specific Identification: You designate exactly which shares (lots) are being sold. This gives the most control over your tax outcome — for example, you could choose to sell the highest-cost lot first to minimize the gain. You must adequately identify the specific shares at or before the time of sale.
- First-In, First-Out (FIFO): The IRS default. Shares purchased earliest are considered sold first. In a long-running bull market this often means selling the lowest-cost (highest-gain) shares first.
- Average Cost: Commonly used for mutual funds and some ETFs. All shares in an account are averaged to determine a single per-share basis. Once selected for a fund, switching methods requires IRS notification.
Adjustments to Cost Basis
Several events adjust your cost basis over time:
- Stock splits: If a stock splits 2-for-1, you own twice as many shares at half the per-share cost basis (total basis is unchanged).
- Reinvested dividends (DRIP): Each reinvested dividend purchase creates a new tax lot with its own cost basis and purchase date. Failing to account for these lots is a common source of double-taxation errors.
- Return of capital distributions: These reduce your cost basis rather than being taxed immediately, which increases your eventual capital gain.
For a step-by-step estimate of your own situation, use our free Capital Gains Tax Calculator. For definitions of terms used in this section, visit our Glossary.
The Wash Sale Rule
The wash sale rule (IRC Section 1091) prevents taxpayers from claiming a loss on the sale of a security while maintaining substantially the same market exposure. Specifically, you cannot claim a capital loss on a security sale if you purchase substantially identical securities within the 30-day window before or after the sale (a 61-day window in total).
Key Wash Sale Rule Features
- The rule applies across all accounts — including taxable brokerage accounts, traditional IRAs, and Roth IRAs. Buying back the same stock in your IRA within 30 days of a loss sale in your taxable account triggers the wash sale rule.
- The disallowed loss is not permanently lost — it is added to the cost basis of the replacement shares, effectively deferring the loss until you sell those shares.
- The holding period of the replacement shares includes the holding period of the sold shares for purposes of determining short-term vs long-term treatment.
- “Substantially identical” generally includes the same stock or an option or futures contract on that stock. It typically does not include a different company in the same industry or a broad index fund covering a similar sector (though the IRS has not issued definitive guidance on all cases).
Tax-Loss Harvesting
Tax-loss harvesting is the practice of strategically realizing capital losses to offset capital gains during the same tax year, thereby reducing your overall tax liability. It is an educational concept widely discussed in financial planning literature — though any implementation should be evaluated in the context of your specific tax and financial situation with a qualified tax professional.
How It Works
If you hold positions that are currently below your cost basis (unrealized losses), selling them before year-end generates a realized loss that can offset realized gains elsewhere in your portfolio. The order of netting matters under IRS rules:
- Short-term losses first offset short-term gains.
- Long-term losses first offset long-term gains.
- Remaining excess losses of either type then offset the other type.
- Any net capital loss remaining after offsetting all capital gains may be deducted against up to $3,000 of ordinary income per year ($1,500 if married filing separately).
- Losses exceeding the annual $3,000 limit carry forward indefinitely to future tax years and retain their character (short-term or long-term).
Interaction With the Wash Sale Rule
Tax-loss harvesting only works if you avoid triggering the wash sale rule. After selling a position at a loss, you must either:
- Wait at least 31 days before repurchasing the same or substantially identical security, or
- Replace the sold position with a similar — but not substantially identical — security to maintain your market exposure while preserving the tax loss.
For example, selling an S&P 500 ETF from one fund family and purchasing a comparable broad US equity ETF from a different fund family is a common approach for maintaining exposure while recognizing the loss — though the IRS has not issued definitive guidance on all cases. Consult a qualified tax professional to evaluate whether specific securities are considered substantially identical in your circumstances.
Reporting Capital Gains on Your Tax Return
Capital gains and losses from stock transactions are reported on your federal income tax return using two key forms:
- Form 8949 (Sales and Other Dispositions of Capital Assets): Each individual transaction — every stock sale — is reported here. You list the description of the asset, the date acquired, the date sold, the proceeds, the cost basis, any adjustments (such as disallowed wash sale losses), and the resulting gain or loss. Transactions are separated into short-term (Part I) and long-term (Part II).
- Schedule D (Capital Gains and Losses): This aggregates the totals from Form 8949 and any other capital gain or loss transactions. The net capital gain or loss from Schedule D flows to your Form 1040.
- Form 1099-B: Your brokerage is required to send you a 1099-B by mid-February each year summarizing all reportable sales from the prior tax year. It includes proceeds, cost basis (for covered securities), and holding period information. However, 1099-Bs can contain errors — particularly for older positions, transfers between brokers, stock splits, and DRIP purchases — so always verify the figures.
Capital Gains in Retirement Accounts
One of the most significant tax advantages of retirement accounts is that capital gains realized inside the account are not taxable in the year they occur. This allows investments to compound without an annual tax drag — a powerful structural advantage over taxable accounts for long-term investors.
Tax-Deferred Accounts (Traditional 401(k), Traditional IRA)
Contributions to a traditional 401(k) or traditional IRA are generally made with pre-tax (or tax-deductible) dollars. All gains, dividends, and interest accumulate tax-deferred inside the account. Taxes are owed when you take distributions (withdrawals) in retirement, at which point the full amount withdrawn is taxed as ordinary income — regardless of whether the growth came from capital gains or dividends. There are no long-term capital gains rates inside these accounts; everything comes out as ordinary income.
Tax-Free Growth (Roth IRA, Roth 401(k))
Roth accounts are funded with after-tax dollars. In exchange, qualified distributions in retirement are entirely tax-free — including all accumulated capital gains, dividends, and interest. This can be extraordinarily valuable for investors who expect significant appreciation over a long time horizon, as decades of compound growth can be withdrawn without any federal income tax.
Gifting Stock and Inherited Stock
The tax treatment of stocks received as a gift or through inheritance differs significantly from stock you purchase yourself — and understanding these rules represents some of the most consequential tax planning available under current US law.
Gifted Stock — Carryover Basis
When you receive stock as a gift, you generally take the donor's cost basis (called carryover basis). If the stock has appreciated since the donor purchased it, you will owe capital gains tax on the full appreciation — including the gain that accrued while the donor owned the shares — when you eventually sell.
The holding period also carries over: if the donor held the stock for more than one year, your holding period begins from the donor's original purchase date (making it immediately long-term for capital gains purposes). There are special rules if the stock is worth less than the donor's basis at the time of the gift — consult a qualified tax professional in that scenario.
Inherited Stock — Stepped-Up Basis
Inherited stock generally receives a stepped-up basisto the fair market value of the stock on the date of the decedent's death (or an alternate valuation date in some estates). This is one of the most significant tax planning concepts in US law: all capital appreciation that occurred during the decedent's lifetime permanently escapes capital gains tax.
The stepped-up basis rule has been subject to periodic legislative proposals to modify or repeal it. As of the 2025 tax year it remains in effect. Consult a qualified tax professional or estate attorney for guidance on how these rules apply to a specific estate.
Frequently Asked Questions
Do I pay capital gains tax every year or only when I dispose of shares?
You generally owe capital gains tax only when you dispose of (sell) shares — not simply because the value has increased. Gains that exist on paper but have not yet been realized through a sale are called unrealized gains and are not taxable events under current US federal law. Tax is triggered when you actually sell the shares, exchange them, or otherwise dispose of them in a taxable account.
What is the difference between realized and unrealized gains?
An unrealized gain (sometimes called a paper gain) exists when the current market value of a security you own exceeds your cost basis, but you have not yet sold the position. A realized gain occurs when you actually close the position — the IRS taxes realized gains in the year they occur. Unrealized gains do not appear on your tax return and are not subject to income tax under current law.
Can capital losses offset ordinary income?
Yes, but with limitations. Capital losses must first be used to offset capital gains of the same type (short-term losses offset short-term gains; long-term losses offset long-term gains), and then any remaining net capital loss can offset up to $3,000 of ordinary income per year ($1,500 if married filing separately). Losses exceeding this annual limit carry forward indefinitely to future tax years. Consult a qualified tax professional for guidance specific to your situation.
How are dividends taxed differently from capital gains?
Qualified dividends — those paid by US corporations or qualifying foreign corporations on stock held for a minimum period — are taxed at the same preferential long-term capital gains rates (0%, 15%, or 20% depending on income). Ordinary (non-qualified) dividends are taxed as ordinary income at your marginal rate, similar to short-term capital gains. Your brokerage's 1099-DIV will distinguish between qualified and ordinary dividends received during the tax year.
Do I need to pay estimated taxes on capital gains?
If the capital gains you realize during the year are not adequately covered by withholding, you may need to make estimated quarterly tax payments using IRS Form 1040-ES to avoid underpayment penalties. The IRS generally requires that you pay at least 90% of your current year's tax liability, or 100% of last year's liability (110% if your prior-year adjusted gross income exceeded $150,000), whichever is smaller. A qualified tax professional can help you determine whether estimated payments apply to your situation.
Ready to Estimate Your Tax Liability?
Our free Capital Gains Tax Calculator models federal rates, NIIT, and state taxes for your specific scenario.
Continue Learning