Capital Gains Tax Explained: Short-Term vs Long-Term Strategies
By the 24blog Finance Editorial Team · Reviewed for accuracy
In this article
- What Is a Capital Gain, and Why Is It Taxed Differently?
- Short-Term vs Long-Term: The One-Year Cliff
- The 2025 Long-Term Capital Gains Brackets
- The Net Investment Income Tax: The 3.8% Surcharge
- Cost Basis, Adjustments, and Holding Periods
- Three Taxpayers, Three Very Different Bills
- Tax-Loss Harvesting: Turning Losses Into Savings
- Strategic Timing: When to Sell, When to Wait
- Account Type Matters: Where You Hold Assets
- Frequently Asked Questions
- Key Takeaways
If you have ever sold a stock, a fund, or a piece of real estate for more than you paid, you have already met the capital gains tax. It is one of the most consequential taxes an investor ever pays — and the difference between doing it carelessly and doing it intentionally can run into tens of thousands of dollars over a lifetime. The single most important fact to internalize is this: how long you hold an asset before selling matters far more than almost any other variable. A holding period measured in days, versus one measured in years, can change your federal tax rate on the same gain by a factor of two or more.
What Is a Capital Gain, and Why Is It Taxed Differently?
A capital gain is the profit you make when you sell a capital asset for more than its cost basis. Capital assets include stocks, bonds, mutual funds, ETFs, real estate (other than your primary residence, which gets a special exclusion), crypto, and most personal-use property. The gain is simply the sale price minus the cost basis, with some adjustments we will cover shortly. Importantly, the gain is not realized until you actually sell — paper gains in your portfolio are not taxed, which is one of the most powerful features of long-term investing.
The reason capital gains are taxed differently from wages is a deliberate policy choice. Wages are taxed as ordinary income using the seven-bracket system we covered in our guide to income tax brackets. Long-term capital gains, by contrast, are taxed using a separate, lower three-rate system. Congress set this up to reward patient capital — to encourage people to invest in companies rather than spend the money, and to discourage rapid speculation. Whether that policy is fair is a separate debate; for now, the practical takeaway is that the tax code offers you a substantial discount if you hold assets for more than a year before selling them.
Short-Term vs Long-Term: The One-Year Cliff
The dividing line between short-term and long-term capital gains is exactly one year from the purchase date — more precisely, more than one year. If you buy a stock on March 1, 2024, and sell it on March 2, 2025, you have a long-term gain. If you sell on March 1, 2025 — one day earlier — you have a short-term gain. That single day can change the tax rate on a $50,000 gain from 24% to 15%, a difference of $4,500.
Short-term capital gains are taxed as ordinary income. They use the same seven-bracket system as your salary, which means they can be taxed as high as 37% at the federal level. There is no special treatment; a quick flip of a stock is taxed the same way a bonus is. Long-term capital gains, on the other hand, are taxed using a separate three-rate system of 0%, 15%, or 20%, depending on your taxable income. For the majority of middle-class investors, the long-term rate lands at 15%; for higher earners it rises to 20%, and very high earners also pay an additional 3.8% surcharge called the Net Investment Income Tax.
| Holding period | Tax treatment | Top federal rate (2025) | Typical investor impact |
|---|---|---|---|
| One year or less | Ordinary income (short-term) | 37% | Taxed like salary; no preference |
| More than one year | Long-term capital gains | 20% (+3.8% NIIT) | Significant tax savings |
| Real estate (primary home, 2-of-5 years) | $250K/$500K exclusion + long-term | 0%–20% above exclusion | Most home sales tax-free |
| Collectibles (coins, art, gold) | Special long-term rate | 28% | Higher than other long-term gains |
The one-year cliff is not a sliding scale. There is no partial credit for holding an asset for nine months or eleven months. This is why experienced investors almost never sell a winning position in November or December unless they have held it for more than a year — the tax math rarely justifies it.
The 2025 Long-Term Capital Gains Brackets
Long-term capital gains brackets for 2025 use the same income thresholds as ordinary income brackets, but the rate structure is much simpler. There are only three rates: 0%, 15%, and 20%. The 0% bracket is one of the most underused features in the entire tax code, and many retirees and lower-income investors could be paying nothing at all on their long-term gains if they planned around it.
| Long-term rate | Single filer taxable income | Married filing jointly |
|---|---|---|
| 0% | $0 – $48,350 | $0 – $96,700 |
| 15% | $48,351 – $533,400 | $96,701 – $600,050 |
| 20% | $533,401+ | $600,051+ |
These thresholds apply to your total taxable income, not just the gain. So if a retired married couple has $50,000 of pension and Social Security income and realizes a $30,000 long-term gain from selling index fund shares, the entire gain falls inside the 0% bracket and is taxed at zero. Many early retirees use this strategy deliberately — they sell appreciated assets in low-income years to lock in permanently tax-free gains. It is one of the cleanest, most legal tax moves available to ordinary investors.
The 15% bracket covers the vast majority of working investors. A single filer earning $150,000 who sells $20,000 of long-term stock gains will pay 15% on that gain — about $3,000 — without it pushing their ordinary income into a higher bracket. The 20% rate only kicks in at very high income levels, and almost always comes paired with the NIIT we cover next.
The Net Investment Income Tax: The 3.8% Surcharge
The Net Investment Income Tax (NIIT) is a 3.8% surcharge that applies to investment income — including capital gains, dividends, interest, and rental income — for taxpayers above certain income thresholds. It was created as part of the Affordable Care Act and applies on top of the regular capital gains rate, not instead of it. For 2025, the thresholds are $200,000 of modified adjusted gross income for single filers and $250,000 for married couples filing jointly. The tax is 3.8% on the lesser of your net investment income or the amount by which your MAGI exceeds the threshold.
The mechanics get tricky when you straddle the threshold. Suppose a single filer has $180,000 of salary and realizes a $50,000 long-term gain. Their MAGI becomes $230,000, which is $30,000 over the $200,000 NIIT threshold. They pay the 3.8% surcharge on $30,000 of the gain (the lesser of $50,000 gain or $30,000 excess), which is $1,140 — on top of the 15% long-term rate ($7,500). Their effective federal rate on that gain becomes 17.26%, not the headline 15%.
For very high earners — those comfortably above the thresholds — the NIIT effectively turns the 15% long-term rate into 18.8% and the 20% rate into 23.8%. State income tax can layer on another 5% to 13% on top of that, which is why high-income investors in California and New York can face combined marginal rates on long-term gains north of 33%. The gap between the headline long-term rate and the real-world marginal rate is one of the most common planning blind spots we see.
Rule of thumb: if your household income is anywhere near $200,000 (single) or $250,000 (married), run the NIIT math before deciding to sell appreciated assets. Sometimes waiting until a lower-income year saves you more than the 3.8% itself.
Cost Basis, Adjustments, and Holding Periods
Cost basis is the original value of an asset for tax purposes, and getting it right is the difference between paying the correct tax and overpaying by thousands. The default rule is straightforward: basis equals the purchase price plus any commissions or fees paid to acquire the asset. But several adjustments can increase or decrease basis. Reinvested dividends, for example, increase basis because each reinvestment is technically a separate purchase. Stock splits adjust the per-share basis but not the total. Capital improvements to real estate (a new roof, an addition, a major renovation) add to basis, while depreciation reduces it.
One of the most expensive mistakes investors make is paying tax on gains they never really had, because they forgot to account for reinvested dividends. If you bought a mutual fund for $10,000, reinvested $3,000 of dividends over five years, and then sold the position for $15,000, your actual gain is $2,000 — not $5,000. The $3,000 of reinvested dividends was already taxed in the years it was received, so it must be added to your basis to avoid being taxed again. Brokerage 1099-B forms often include this adjustment automatically, but it pays to verify.
The holding period starts the day after acquisition and ends on the day of sale. If you buy shares on January 10 and sell them on January 10 of the following year, your holding period is one day short of one year — short-term. To qualify for long-term treatment, you must sell on January 11 or later. When you sell partial lots of the same security purchased on different dates, you can choose which lots to sell. The default method at most brokerages is FIFO (first in, first out), which often produces the largest gain; specifying specific lots (specific share identification) is almost always more tax-efficient.
Three Taxpayers, Three Very Different Bills
To see how all these rules interact, let us look at three hypothetical taxpayers who each sold $50,000 of stock gains in 2025. Same gain, very different tax bills.
Taxpayer A — Retired couple, $60,000 of pension and Social Security income. Their total taxable income including the $50,000 gain is well below the $96,700 0% bracket threshold for married couples. They pay $0 in federal tax on the gain. State tax depends on where they live, but in a no-tax state like Florida or Texas, the entire gain is tax-free.
Taxpayer B — Single working professional, $110,000 salary, sells $50,000 long-term gain. Total taxable income lands around $135,000 after the standard deduction. The gain falls entirely in the 15% long-term bracket. Federal tax on the gain: $7,500. No NIIT, because MAGI is below $200,000. Total effective federal rate on the gain: 15%.
Taxpayer C — Married high earner, $400,000 salary, sells $50,000 long-term gain. MAGI is around $450,000, well above the NIIT threshold. The gain is taxed at 20% long-term plus 3.8% NIIT, for a combined federal rate of 23.8%. Federal tax on the gain: $11,900. If they live in California, state tax adds roughly another $6,500, pushing the combined rate above 36% — almost as much as if they had held the asset less than a year.
The lesson is not that high earners should avoid investing — it is that high earners have the most to gain from thoughtful timing, tax-loss harvesting, and asset location, all of which we cover next.
Tax-Loss Harvesting: Turning Losses Into Savings
Tax-loss harvesting is the practice of intentionally selling investments at a loss to offset realized capital gains, and then immediately reinvesting the proceeds in a similar (but not "substantially identical") asset to maintain market exposure. The offset works dollar for dollar against capital gains of the same type — short-term losses offset short-term gains first, then long-term gains; long-term losses offset long-term gains first, then short-term gains.
If your total losses exceed your total gains in a given year, you can deduct up to $3,000 of the excess against ordinary income ($1,500 if married filing separately), with any remaining loss carried forward to future years indefinitely. This makes tax-loss harvesting valuable even in years when you have no gains: a $3,000 annual deduction against a 24% marginal rate saves $720 per year, every year, until the loss is used up.
The critical rule to avoid is the wash-sale rule: you cannot buy back the same or a "substantially identical" security within 30 days before or after the sale, or the loss is disallowed. Selling an S&P 500 index fund and buying a total stock market index fund, or swapping between two different fund providers tracking similar but not identical indices, is generally considered safe. Selling one S&P 500 fund and buying another provider's S&P 500 fund is risky. ETFs from different issuers tracking different indices (even similar ones) are usually fine.
Strategic Timing: When to Sell, When to Wait
The simplest and most powerful capital gains strategy is patience. If you are about to sell a winning position you have held for eleven months, waiting a few extra weeks to clear the one-year mark can cut the federal tax rate from your ordinary income rate to 15%. For someone in the 24% bracket realizing a $30,000 gain, that wait is worth $2,700. There are very few situations in life where doing nothing for a month produces a $2,700 return.
Another timing strategy is to bunch gains into low-income years. If you are planning to retire, take a sabbatical, or go back to school, that year's lower income may push you into the 0% long-term bracket, allowing you to sell appreciated assets with zero federal tax. Similarly, if you have a year with large deductible losses (a medical event, a business loss, a large charitable gift), realizing gains in the same year can offset the deductions and effectively tax the gains at a lower rate.
Charitable giving offers another timing opportunity. Donating appreciated long-term stock directly to a charity lets you deduct the full fair market value as a charitable contribution while avoiding capital gains tax on the appreciation entirely. A taxpayer in the 24% bracket who donates $10,000 of stock they bought for $4,000 saves roughly $2,260 in income tax plus $900 in avoided capital gains tax — a combined benefit of $3,160, far better than selling the stock and donating cash.
Account Type Matters: Where You Hold Assets
Asset location — choosing which types of investments go into which types of accounts — is one of the most overlooked tax strategies in personal finance. The basic principle is that tax-inefficient investments (high-turnover funds, taxable bonds, REITs) belong in tax-advantaged accounts like IRAs and 401(k)s, while tax-efficient investments (broad index funds, individual stocks you plan to hold for years) belong in taxable brokerage accounts where they can benefit from long-term capital gains treatment.
Inside a Roth IRA or Roth 401(k), all growth is tax-free forever — there are no capital gains taxes on sales inside the account, no taxes on qualified withdrawals, and no required minimum distributions during the owner's lifetime. This makes Roth accounts the ideal home for your highest-conviction, highest-growth investments. A stock you think could 10x over 20 years belongs in a Roth if possible, because the eventual gain is permanently sheltered.
Inside a traditional IRA or 401(k), there are no capital gains taxes on sales inside the account either, but withdrawals are taxed as ordinary income — even the long-term gains. This means a dollar of gain inside a traditional 401(k) is ultimately taxed at your ordinary rate (up to 37%) instead of the long-term rate (max 20% plus NIIT). For that reason, traditional accounts are best for tax-inefficient assets that would otherwise be taxed harshly in a brokerage account. The combination of traditional and Roth accounts across your investing lifetime gives you enormous flexibility to manage your tax bracket in retirement.
Frequently Asked Questions
How is capital gains tax different from income tax?
Income tax applies to wages, salaries, bonuses, and short-term capital gains using a seven-bracket progressive system with rates up to 37%. Long-term capital gains (assets held more than one year) use a separate, lower three-rate system of 0%, 15%, or 20%. The long-term system exists to reward patient investment and is significantly cheaper than ordinary income tax for most investors.
Do I have to pay capital gains tax if I reinvest the proceeds?
Yes. Selling an asset for a gain triggers a taxable event whether or not you reinvest the proceeds. The exception is inside tax-advantaged accounts like IRAs and 401(k)s, where sales inside the account are not taxed. Reinvested capital gains in a regular brokerage account are taxed in the year they are realized. (Reinvested dividends, however, increase your cost basis going forward.)
What happens if I sell my house — do I owe capital gains tax?
If the home was your primary residence for at least two of the five years before the sale, you can exclude up to $250,000 of gain (single) or $500,000 of gain (married filing jointly) from federal capital gains tax. Any gain above the exclusion is taxed at long-term capital gains rates, provided you owned the home for more than one year.
Can I avoid capital gains tax with a 1031 exchange?
For investment real estate (not your primary residence), a 1031 exchange allows you to defer capital gains tax by reinvesting the proceeds into another qualifying property within strict timeframes. The gain is not eliminated — it is rolled into the new property's basis. This is a powerful deferral tool for real estate investors but does not apply to stocks, bonds, or personal-use property.
Are cryptocurrency gains taxed as capital gains?
Yes. The IRS treats cryptocurrency as property for tax purposes, which means selling, trading, or using crypto to buy goods and services is a taxable capital gain or loss. Short-term rules apply if you held the crypto for one year or less; long-term rates apply if you held it for more than one year. The one-year cliff works exactly the same way as for stocks.
Key Takeaways
- The one-year holding period cliff is the single most important variable in capital gains tax. Crossing it can cut your federal rate from as high as 37% to as low as 0%.
- Long-term capital gains are taxed at 0%, 15%, or 20% depending on income, with most working investors falling in the 15% bracket.
- The 3.8% Net Investment Income Tax applies to investment income above $200,000 (single) or $250,000 (married) of MAGI, pushing the top effective federal rate on long-term gains to 23.8%.
- Cost basis is more than just purchase price — reinvested dividends, capital improvements, and depreciation all adjust it. Getting basis wrong means paying tax on gains you never economically had.
- Tax-loss harvesting can offset gains dollar-for-dollar, plus up to $3,000 of ordinary income per year, with any excess carrying forward indefinitely.
- Asset location matters: hold your highest-growth investments in Roth accounts, tax-inefficient assets in traditional accounts, and tax-efficient index funds in taxable brokerage accounts.
- Donating appreciated long-term stock to charity lets you deduct the full value while avoiding capital gains tax on the appreciation — often a better outcome than selling and donating cash.
Put this into practice
Run the numbers yourself with our free Tax calculators.
Explore tax calculators →