

Learn how investments are taxed across every account type, from capital gains and dividends to IRAs and 401(k)s. Includes 2025-2026 rates and examples.

Short-term capital gains tax applies to assets sold within one year and is taxed as ordinary income. See 2025-2026 rates and what selling early costs.

Learn exactly what taxes you owe on stocks when you sell, hold, or collect dividends. Includes 2025-2026 rates, worked examples, and the wash sale rule.

Founder of Arcanomy
Ph.D. engineer and MBA writing about wealth psychology, financial clarity, and why most money advice misses the point.
Subscribe for more insights, tips, and updates, straight to your inbox.
We respect your privacy and will never share your information.
Sarah bought 200 shares of a mid-cap tech company in March 2022 for $5,000. Three years later, she sold them for $25,000. The $20,000 profit felt great, right up until she realized the IRS expected a check for $3,000 of it.
That's capital gains tax at work. It's the price of successful investing, and almost every investor will face it eventually.
The good news: the rules are predictable, the math is straightforward, and with a little planning, you can keep significantly more of your profits.
The quick version: Capital gains tax hits the profit from selling investments. Hold longer than a year and you'll pay 0%, 15%, or 20%. Sell sooner and it's taxed like your paycheck. Losses offset gains.
A capital gain is the profit you make when you sell an asset for more than you paid. Stocks, bonds, real estate, cryptocurrency, your grandmother's coin collection. If you bought it and sold it for more, the IRS calls that difference a capital gain.
The word that matters most here is "realized." Your brokerage account might show $40,000 in unrealized gains right now, and you owe nothing on any of it. The IRS doesn't tax paper profits. Gains become taxable only when you sell.
This is why buy-and-hold investors have a structural tax advantage. Warren Buffett has held Coca-Cola stock since 1988. Decades of appreciation, zero capital gains tax, because he hasn't sold.
The flip side works too. Sell an asset for less than you paid, and you have a capital loss. Those losses are useful: they offset your gains and can reduce your tax bill.
The single most important factor in your capital gains tax bill isn't the size of your profit. It's how long you held the asset.
Short-term capital gains apply to assets held one year or less. The IRS taxes these at your ordinary income tax rate, which runs from 10% to 37% in 2025.
Long-term capital gains apply to assets held more than one year. These get preferential rates: 0%, 15%, or 20%.
That distinction is enormous. A single filer earning $90,000 with a $10,000 stock profit would pay $2,200 in tax if they sold at 11 months (22% ordinary rate). Wait two more months? $1,500 (15% long-term rate). Same profit, $700 difference.
The clock starts the day after you buy. Purchase shares on June 1, and the earliest you qualify for long-term treatment is June 2 of the following year. One day short, and you're back to ordinary income rates.
| Holding Period | Tax Treatment | 2025 Rate Range |
|---|---|---|
| One year or less | Ordinary income rates | 10% to 37% |
| More than one year | Preferential long-term rates | 0%, 15%, or 20% |
For a deeper look at what selling early actually costs, see what short-term capital gains mean for your tax bill. And if you want the full breakdown of the preferential brackets, our long-term capital gains rate guide walks through every threshold.
Your long-term rate depends on your taxable income and filing status. Here are the 2025 thresholds:
| Rate | Single | Married Filing Jointly | Head of Household |
|---|---|---|---|
| 0% | Up to $48,350 | Up to $96,700 | Up to $64,750 |
| 15% | $48,351–$533,400 | $96,701–$600,050 | $64,751–$566,700 |
| 20% | Over $533,400 | Over $600,050 | Over $566,700 |
Source: IRS Revenue Procedure 2024-40.
One thing trips people up constantly: your ordinary income "fills" the lower brackets first, and then your capital gains sit on top. If your salary already pushes you past the 0% threshold, your gains land in the 15% bucket even if the gains themselves are small. For every bracket by income and filing status, we break it down with worked examples.
High earners face one more layer. The Net Investment Income Tax (NIIT) adds 3.8% on investment income (including capital gains) when your modified adjusted gross income exceeds $200,000 for single filers or $250,000 for married couples filing jointly. Those thresholds, frustratingly, are not adjusted for inflation. They've been stuck there since 2013.
So a married couple earning $400,000 with a $50,000 long-term gain wouldn't just pay 15% on that gain. They'd also owe 3.8% NIIT on the fifty grand, bringing their effective rate to 18.8%, or $9,400.
The core formula is simple:
Sale Price − Cost Basis = Capital Gain (or Loss)
Your cost basis is what you paid, plus adjustments. For stocks, that includes commissions and reinvested dividends. For real estate, add closing costs and the $47,000 kitchen renovation. Subtract any depreciation you've claimed.
Let's walk through Sarah's numbers from the opening:
Sarah's ordinary income of $80,000 already exceeds the $48,350 threshold for the 0% bracket. Her entire $20,000 gain sits in the 15% bracket.
Tax on the gain: $20,000 × 15% = $3,000
Her MAGI ($115,000) falls below the NIIT threshold, so no surtax.
If Sarah had sold after just 10 months, that same gain would face her 22% marginal income tax rate: $4,400. Holding an extra five months saved her $1,400. That's a nice weekend trip, funded entirely by patience.
Not every capital gain follows the 0/15/20 structure:
Collectibles. Art, antiques, coins, stamps, and precious metals face a maximum 28% rate on long-term gains, even if your income would normally qualify you for 15%.
Depreciation recapture. Sell rental property and the IRS taxes the depreciation you previously deducted at up to 25%. The remaining gain gets standard long-term treatment.
Your home. Single filers can exclude up to $250,000 in gain from selling a primary residence. Married couples get $500,000. You must have owned and lived in the home for at least two of the five years before selling. This isn't technically a capital gains "rate," but it's one of the most powerful tax breaks in the code.
Real life is messier than tax tables suggest. Inherited assets get a stepped-up basis, which you can read about in our guide to capital gains on inherited property. And if you're wondering whether retirees get any special breaks, what seniors actually owe on capital gains addresses that directly.
1. Hold for more than a year. The simplest move. Crossing the one-year mark drops your rate from ordinary income levels to long-term levels. Set a calendar reminder for your purchase date plus 366 days.
2. Harvest losses. Capital losses offset capital gains dollar-for-dollar. If you have $8,000 in gains and $5,000 in losses, you only pay tax on $3,000. Losses exceeding gains can offset up to $3,000 of ordinary income per year, with the rest carrying forward indefinitely. Our full walkthrough of how tax-loss harvesting works covers the strategy and the wash-sale rule.
3. Use tax-advantaged accounts. Investments inside a 401(k) or IRA grow without triggering annual capital gains. Trade as much as you want inside these accounts. Roth IRAs are particularly powerful: qualified withdrawals are completely tax-free, including all gains.
4. Time sales around income drops. Between jobs? Just retired? Early in a sabbatical year? That's prime time to sell winners while your income is low enough to qualify for the 0% rate.
5. Donate appreciated stock to charity. Give the shares directly instead of selling and donating cash. You avoid capital gains entirely and still get a deduction for the full market value. Fidelity Charitable and Schwab Charitable both make this straightforward.
Federal capital gains tax is only part of the bill. Most states tax investment gains too, often at the same rate as ordinary income. California's top rate hits 13.3%. New York goes to 10.9%.
Eight states don't tax capital gains at all: Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas, and Wyoming. Washington State doesn't have an income tax but imposes a 7% excise tax on capital gains exceeding $278,000 for 2025.
The variation is staggering. A $150,000 long-term gain for a single filer in the 15% federal bracket costs $22,500 federally. In California, add roughly $19,950. In Florida, add nothing. That's a $19,950 gap based purely on your mailing address. We cover the full landscape in how your state taxes investment profits.