Long-term capital gains are taxed at 0%, 15%, or 20% in 2026 — far below ordinary income rates. Hold for more than one year, and most investors cut their investment tax bill in half.
Capital gains on investments are taxed based on holding period: assets held more than one year qualify for long-term rates of 0%, 15%, or 20%. Assets held one year or less are taxed at your ordinary income rate — up to 37%. High earners also pay a 3.8% Net Investment Income Tax on investment income above $200K (single) / $250K (MFJ). Account type matters: gains inside Roth IRAs are never taxed.
When you sell an investment for more than you paid, the IRS taxes the difference — that's a capital gain. How much you pay depends on one key fact: how long you held the investment before selling. The difference between a one-year holding period and thirteen months can cut your tax bill in half. Here's how the 2026 rate structure works.
A capital gain is the profit on the sale of a capital asset — a stock, bond, mutual fund, ETF, or similar investment. The math is straightforward:
Proceeds (sale price) − Cost basis = Capital gain or loss
The cost basis is what you paid for the investment, including any commissions or purchase fees. If you paid $5,000 for shares of stock and sold them for $8,000, your capital gain is $3,000. If you sold for $4,500, you have a $500 capital loss.
Capital losses offset capital gains. If you have $10,000 of gains and $4,000 of losses, only $6,000 is taxable. And if your losses exceed your gains, up to $3,000 of net capital losses per year can be deducted against ordinary income — with unused losses carried forward indefinitely. Per IRS Topic No. 409: Capital Gains and Losses, losses must first offset gains of the same type before they can be applied against ordinary income.
The IRS splits capital gains into two categories based on your holding period — the time between acquisition and sale.
Short-term capital gains: You held the asset one year or less. Short-term gains are taxed as ordinary income — the same brackets as wages, ranging from 10% to 37% in 2026. A short-term gain in the 24% bracket is taxed at 24%.
Long-term capital gains: You held the asset more than one year. Long-term gains qualify for preferential rates: 0%, 15%, or 20%, depending on your taxable income.
The difference is large. On a $30,000 gain, the 24% short-term rate means $7,200 owed. At the 15% long-term rate, the same gain costs $4,500. Holding an investment for thirteen months instead of eleven months on a gain of that size saves $2,700 in federal taxes — for doing nothing except waiting.
Long-term capital gains are taxed at three possible federal rates determined by your taxable income for the year. The rate applies only to the long-term gain portion — not to your wages or other ordinary income.
| Long-term rate | Taxable income (single) | Taxable income (MFJ) | |---|---|---| | 0% | Up to ~$48,350 | Up to ~$96,700 | | 15% | ~$48,350 to ~$533,400 | ~$96,700 to ~$600,050 | | 20% | Above ~$533,400 | Above ~$600,050 |
*Thresholds are adjusted annually for inflation by the IRS. For the exact 2026 figures, see IRS Topic No. 409.*
The 0% rate is meaningful. If your total taxable income — wages plus investment income — stays below the threshold, you owe zero federal tax on long-term gains. Many retirees and lower-income investors qualify; this is one reason tax-aware investors manage their income carefully in years when they rebalance.
The 20% rate applies only to the highest earners. The overwhelming majority of investors who hold assets long enough pay 15%.
High-income investors face an additional layer: the Net Investment Income Tax (NIIT), a 3.8% surtax on net investment income for taxpayers whose Modified Adjusted Gross Income (MAGI) exceeds $200,000 (single) or $250,000 (married filing jointly).
Net investment income includes capital gains, dividends, interest, and passive business income. The surtax is calculated on the lesser of (a) your net investment income or (b) the amount by which your MAGI exceeds the threshold — so it doesn't apply to the full amount for investors who just cross the line.
At the top bracket, the combined rate on long-term gains reaches 23.8% (20% + 3.8%). The NIIT is reported on Form 8960 and flows into your Form 1040. It doesn't replace the capital gains rate — it's on top of it.
When you own shares purchased at different times and prices, the IRS lets you choose which shares you're treating as sold — a choice that affects your gain, your holding period, and which rate applies.
Common methods, per IRS Publication 550: Investment Income and Expenses:
First in, first out (FIFO): The default for most brokerages. The oldest shares are treated as sold first — typically the lowest basis, which often means the largest gain.
Specific identification: You tell your brokerage which exact shares (by lot and acquisition date) to sell. This lets you select the highest-basis shares to minimize the current gain, or the most recently purchased shares to keep long-term positions intact.
Average cost: Used primarily for mutual funds. The average cost across all shares becomes the basis for each share sold.
Your brokerage tracks and reports cost basis on Form 1099-B, but the accuracy responsibility is yours — especially for shares acquired through employer stock plans, inherited accounts, or gifts. Inherited assets generally receive a stepped-up basis to the fair market value at the date of the original owner's death, which can eliminate tax on appreciation that occurred during their lifetime.
Tax-loss harvesting is the practice of selling investments at a loss in a taxable account to offset gains elsewhere — reducing your net taxable gain for the year. If you have $12,000 of long-term gains and harvest $5,000 in losses, your net taxable gain is $7,000.
The constraint is the wash-sale rule: you cannot repurchase the same or "substantially identical" security within 30 days before or after the sale (a 61-day window total). Buying back the same ETF the next day disallows the loss. The loss isn't permanently gone — it adds to the replacement security's cost basis — but you lose the current-year tax benefit.
Selling one S&P 500 ETF and buying a different S&P 500 ETF from another fund family is often treated as a wash sale by the IRS if the funds track identical indexes. Selling an S&P 500 fund and buying a total-market fund or an international fund generally avoids the wash-sale trap. Consult your tax advisor on edge cases.
Capital gains tax on investments applies only in taxable brokerage accounts. Inside retirement accounts, the calculation is entirely different:
Traditional 401(k) / IRA: Contributions are pre-tax; earnings grow tax-deferred. You don't pay capital gains tax on gains inside the account each year. Distributions in retirement are taxed as ordinary income — at your regular bracket, not at the preferential long-term capital gains rate.
Roth IRA / Roth 401(k): Contributions are after-tax; earnings grow tax-free. Qualified distributions in retirement — including all investment gains — are never taxed. No capital gains tax, no NIIT, no ordinary income tax on growth.
The practical implication: your highest-expected-return investments (growth stocks, small-cap ETFs) generally belong in accounts where future gains will be taxed least. A Roth IRA, where growth is permanently tax-free, is typically a better home for high-growth assets than a taxable brokerage account where long-term gains rates will apply. For a deeper look at how account type affects tax treatment over time, see Roth IRA vs. Traditional IRA: How to Choose in 2026.
If you're starting to build a portfolio and deciding which accounts to open and fund first, how to start investing: a beginner's framework covers the order of operations — employer match, Roth IRA, taxable brokerage — before you pick any specific investment.
Capital gains on real estate follow the same short-term / long-term framework, with one major difference: the Section 121 exclusion lets most primary-residence sellers exclude up to $250,000 (single) or $500,000 (married filing jointly) of home-sale gains from tax entirely. For how that works, see capital gains on selling a house: how the $250K exclusion works.
---
*This content is for educational purposes only and does not constitute tax or investment advice. Capital gains tax rates, income thresholds, and investment rules are set by the Internal Revenue Code and may change — verify current rates and thresholds with your tax advisor and at irs.gov/taxtopics/tc409 before filing.*
More than one year from the date of acquisition to the date of sale. If you sell on the exact one-year anniversary of your purchase, it's still short-term — you need to hold until at least one day after the one-year mark. The holding period is measured precisely by the IRS. Per IRS Topic No. 409, the day you acquire the asset is not counted, but the day you sell it is.
It depends on how long you held the shares. Short-term gains (held one year or less) are taxed at ordinary income rates — 10% to 37% in 2026. Long-term gains (held more than one year) are taxed at 0%, 15%, or 20% based on your taxable income. Most investors fall in the 15% bracket. For the exact 2026 income thresholds, see IRS Topic No. 409: Capital Gains and Losses.
Yes, but only up to $3,000 per year. If your capital losses exceed your gains, you can deduct up to $3,000 of net capital losses against ordinary income (wages, self-employment income, etc.). Losses beyond $3,000 carry forward to future tax years indefinitely, where they continue to offset gains and up to $3,000 of ordinary income per year. Per IRS Topic No. 409, losses must first offset gains of the same type (short-term against short-term, long-term against long-term) before being applied across types or against ordinary income.
No. Capital gains inside retirement accounts — Roth IRA, traditional IRA, 401(k), and other tax-advantaged accounts — are not subject to capital gains tax on an annual basis. In a Roth IRA, qualified distributions in retirement are completely tax-free, including all investment gains. In a traditional IRA or 401(k), distributions are taxed as ordinary income (not at capital gains rates) when withdrawn in retirement. Only taxable brokerage accounts trigger capital gains tax when you sell.
The wash-sale rule disallows a capital loss if you purchase the same or substantially identical security within 30 days before or after the sale — a 61-day window in total. The disallowed loss is not permanently lost; it's added to the cost basis of the replacement security, which reduces your future taxable gain when you eventually sell. Per IRS Publication 550: Investment Income and Expenses, the rule applies to stocks, bonds, ETFs, and options on the same or substantially identical securities.