Capital Gains Tax Explained: Short-Term vs. Long-Term
Sell a winning investment and the IRS becomes your silent partner in the profit — but how big a partner depends almost entirely on one thing: how long you held the asset before selling. Hold a stock for 364 days and your gain is taxed like salary, at rates up to 37%. Hold it for 366 days and the same gain might be taxed at 15% — or, for many middle-income filers, at exactly 0%.
That cliff between short-term and long-term treatment is the single most important fact in investment taxation, and it’s fully under your control. No other part of the tax code hands you a lever this powerful just for being patient.
This guide explains when gains are actually taxed (later than you’d think), how the two rate schedules work with 2025 numbers, how cost basis and losses fit in, and the handful of practical strategies — timing, harvesting, account location — that let ordinary investors keep more of what their money earns.
Gains Are Taxed When Realized, Not When Earned
A capital gain is the profit from selling a capital asset — stocks, ETFs, mutual funds, crypto, real estate, even collectibles — for more than you paid. The critical rule: taxation happens at realization, the moment you sell.
- Your index fund climbing 20% this year? No tax. Unrealized gains are invisible to the IRS.
- Selling that fund and locking in the 20%? Taxable event in the year of sale.
This makes deferral the default superpower of buy-and-hold investing: money that would have gone to taxes stays invested and compounds. A dollar of tax deferred for 20 years is far cheaper than a dollar of tax paid annually — you can see the effect of uninterrupted compounding with the compound interest calculator.
Two related cash flows are taxed differently: dividends are taxed in the year received (qualified dividends get the favorable long-term rates; ordinary dividends get ordinary rates), and mutual funds can pass through capital gain distributions even when you didn’t sell — one structural reason ETFs tend to be more tax-efficient, as covered in index funds vs. ETFs.
Cost Basis: The Number That Determines Your Gain
Your gain is simply:
Sale proceeds − cost basis = capital gain (or loss)
Cost basis is what you paid, including commissions, adjusted for events like reinvested dividends (which add to basis — a commonly missed adjustment that causes double taxation of the reinvested amount). If you bought shares at different times, each purchase lot has its own basis and holding period, and when you sell part of a position, which lots you sell determines your tax. Brokers report basis to you and the IRS on Form 1099-B, but the responsibility for accuracy is yours — especially for assets moved between brokers or acquired long ago.
Worked Example: The Basic Calculation
You bought 100 shares at $50 ($5,000 basis) and sell all 100 at $80 ($8,000 proceeds):
- Capital gain: $8,000 − $5,000 = $3,000
- Held 11 months (short-term), 22% bracket: $3,000 × 0.22 = $660 tax
- Held 13 months (long-term), 15% capital gains rate: $3,000 × 0.15 = $450 tax
Waiting two extra months saved $210 on a modest position — the effect scales linearly with the size of the gain, and the rate gap is even wider in higher brackets.
The Two Rate Schedules
Short-Term: Ordinary Rates
Gains on assets held one year or less stack on top of your other income and are taxed through the regular brackets — 10% to 37%. There is no special short-term schedule; a short-term gain is treated like extra salary. (If the marginal-bracket mechanics are hazy, see how tax brackets really work.)
Long-Term: 0%, 15%, or 20%
Gains on assets held more than one year get their own, lower brackets based on your taxable income. For 2025, the widely published thresholds are:
| Long-term rate | Single (taxable income) | Married filing jointly |
|---|---|---|
| 0% | Up to $48,350 | Up to $96,700 |
| 15% | $48,351 – $533,400 | $96,701 – $600,050 |
| 20% | Over $533,400 | Over $600,050 |
These thresholds adjust annually for inflation — verify current figures at irs.gov.
Three refinements:
- Gains stack on top of ordinary income for determining which rate applies. Your salary fills the brackets first; the gains sit on top.
- The 0% bracket is real and underused. A married couple with $70,000 of taxable ordinary income could realize roughly $26,700 of long-term gains at a 0% federal rate in 2025 ($96,700 − $70,000).
- High earners pay a surcharge: the net investment income tax (NIIT) adds 3.8% on investment income above $200,000 of modified AGI (single) or $250,000 (joint), making the top effective federal rate on long-term gains 23.8%.
Worked Example: Stacking and the 0% Rate
Priya is single with $35,000 of taxable ordinary income and sells a fund held three years for a $5,000 long-term gain:
- Total taxable income: $40,000
- The gain occupies the $35,000–$40,000 layer — entirely below the $48,350 threshold for 2025
- Long-term capital gains tax: $0
Same facts, but a $20,000 gain: income runs to $55,000. The portion up to $48,350 (that’s $13,350 of gain) is taxed at 0%; the remaining $6,650 at 15% = $997.50. The stacking rule means low-income years — early retirement, sabbaticals, grad school — are golden windows for realizing gains cheaply.
Losses: The Other Half of the Ledger
Investments that lost money generate capital losses when sold, and the netting rules are mechanical:
- Losses offset gains of the same type first (short vs. short, long vs. long), then cross over.
- If net losses remain, up to $3,000 per year deducts against ordinary income ($1,500 married filing separately).
- Anything beyond that carries forward indefinitely to future years.
Tax-Loss Harvesting
Tax-loss harvesting means deliberately selling losing positions to bank the loss while keeping your portfolio invested — typically by immediately buying a similar-but-not-identical fund. Example: you harvest a $7,000 loss in a year with a $4,000 realized gain. The loss wipes out the $4,000 gain, deducts $3,000 against ordinary income (saving $660 at a 22% rate), and you remain fully invested.
Worked Example: A Multi-Year Loss Carryforward
Suppose a rough year leaves you with $12,000 of realized losses and $2,000 of realized gains. The netting runs: $12,000 − $2,000 = $10,000 net loss. You deduct $3,000 against this year’s ordinary income (worth $660 at a 22% rate) and carry $7,000 forward. Next year you realize a $5,000 gain: the carryforward erases it entirely, deducts another $2,000 against ordinary income, and the slate is clean. Across two years, the original loss offset $7,000 of gains and $5,000 of ordinary income — real money recovered from a bad investment, but only because the loss was realized and tracked. Carryforwards ride along on Schedule D each year; losing track of one is the same as tipping the IRS.
The guardrail is the wash sale rule: if you buy the same or a “substantially identical” security within 30 days before or after the loss sale, the loss is disallowed (it’s added to the new position’s basis instead — deferred, not destroyed). Swapping one broad-market fund for a different-but-similar index generally avoids the problem; robotically rebuying the identical ETF next week does not. The SEC’s investor education site has plain-language material on these mechanics at investor.gov.
Special Cases Worth Knowing
- Your home: gains on a primary residence get a large exclusion — up to $250,000 single / $500,000 married filing jointly if you owned and lived in it for two of the last five years. Keep records of improvements; they raise basis and shrink any taxable gain above the exclusion.
- Crypto: taxed as property — every sale, swap, or purchase made with crypto is a realization event with the same short/long rules.
- Collectibles: long-term gains on art, coins, and precious metals face a higher maximum rate (28%) than stocks.
- Inherited assets: heirs generally receive a step-up in basis to the value at the owner’s death, erasing the unrealized gain for income-tax purposes. Inherited assets are also automatically treated as long-term.
- Gifted assets: the recipient usually takes over the giver’s basis and holding period — gifting appreciated stock transfers the tax liability along with the shares.
- Retirement accounts: none of this chapter applies inside a 401(k), IRA, or HSA — no capital gains tax on trades within them; traditional-account withdrawals are ordinary income instead. Where you hold each asset matters, which is the “asset location” idea covered in our tax-advantaged accounts overview.
Practical Strategies for Ordinary Investors
You don’t need exotic structures to manage capital gains well. The core playbook:
- Cross the one-year line when you reasonably can. Check the purchase date before selling a winner; days matter at the boundary.
- Realize gains in low-income years and harvest losses in high-income years — the same gain can cost 0%, 15%, or 22%+ depending purely on timing.
- Fill the 0% bracket deliberately. In lean years, selling and even immediately rebuying winners (“gain harvesting” — there’s no wash sale rule for gains) resets your basis higher at zero federal cost.
- Hold tax-inefficient assets in tax-advantaged accounts and broad index funds in taxable accounts.
- Keep basis records religiously, especially for reinvested dividends and transfers.
- Don’t let taxes veto good decisions. Refusing to trim a dangerously concentrated position to avoid a 15% tax is risk mismanagement dressed up as tax planning — a cousin of the errors in common investing mistakes beginners make.
Reporting and Paying: What Happens at Filing Time
Capital gains don’t stay theoretical — they flow through a specific paper trail, and knowing it prevents the most common reporting errors.
Each January, your broker sends Form 1099-B (or a consolidated 1099) listing every sale: proceeds, basis (when known to the broker), acquisition and sale dates, and whether each lot was short- or long-term. Those sales land on Form 8949, are summarized on Schedule D, and the resulting gain or loss joins your other income on Form 1040. Good software imports all of this directly from major brokers; your job is to verify basis on anything the broker flagged as “noncovered” — typically old positions or shares transferred between firms — because for those lots, the IRS receives the proceeds but not the basis, and an unreported sale can look like 100% profit to their matching computers.
Counting the Holding Period Correctly
The clock starts the day after your trade date and includes the day you sell. “More than one year” means a year and a day at minimum — sell on the exact anniversary and the gain is still short-term. When you sell part of a position, brokers default to FIFO (first-in, first-out), but you can usually specify lots before the trade settles; choosing a high-basis or long-term lot instead of the default can change the tax on the same sale materially.
Big Gain? Mind the Pay-As-You-Go Rules
Taxes on a large realized gain aren’t due only in April. The U.S. system expects payment through the year, so a six-figure gain in June with no extra withholding can trigger an underpayment penalty even if you pay in full at filing. The clean solutions: make an estimated payment for the quarter of the sale at irs.gov/payments, or rely on the safe harbor of having paid 100% of last year’s total tax (110% if your AGI topped $150,000) through withholding and estimates. Misreporting basis — or forgetting a 1099-B entirely — is a classic error; see 10 common tax filing mistakes before you file a year with lots of trades.
The Bottom Line
Capital gains tax runs on three dials: what you gained (proceeds minus basis), how long you held (one year is the cliff between ordinary rates and the 0/15/20% schedule), and what else you earned (gains stack on your other income to find their rate). Losses are the counterweight — offsetting gains, trimming up to $3,000 of ordinary income a year, and carrying forward forever — as long as you respect the 30-day wash sale window.
For long-term investors the strategy is almost embarrassingly simple: buy, hold past a year (usually much longer), realize gains in cheap years, harvest losses in expensive ones, and let deferral compound quietly in the background. Patience is literally tax-advantaged.
Thresholds move with inflation every year and special rules carry fine print, so before acting on a large sale — a house, a concentrated stock position, an inheritance — confirm the current numbers at irs.gov and consider an hour with a tax professional. On a six-figure gain, one well-timed decision can be worth more than a year of investment returns.
Frequently Asked Questions
What is the difference between short-term and long-term capital gains?
Short-term gains come from assets held one year or less and are taxed at your ordinary income rates. Long-term gains come from assets held more than one year and get preferential rates of 0, 15, or 20 percent depending on your taxable income. The dividing line is strict, one year plus at least a day.
Do I pay capital gains tax when my investments go up in value?
No. Gains are only taxed when realized, meaning when you sell the asset. An investment that grows for decades inside your brokerage account generates no capital gains tax until the year you sell, which is why long-term investors can defer tax for a very long time.
What is the 0 percent capital gains rate and who qualifies?
Long-term gains that fall within the lowest capital gains bracket are taxed at 0 percent. For 2025 that bracket covers taxable income up to about 48,350 dollars for single filers and 96,700 dollars for married couples filing jointly, including the gains themselves. Check irs.gov for current thresholds.
Can investment losses reduce my taxes?
Yes. Realized losses first offset realized gains. If losses exceed gains, up to 3,000 dollars of the excess can be deducted against ordinary income each year, and any remainder carries forward to future years indefinitely. Watch the wash sale rule, which disallows a loss if you rebuy the same or a substantially identical investment within 30 days.
Do I owe capital gains tax when I sell my home?
Often not. If the home was your primary residence for at least two of the last five years, you can generally exclude up to 250,000 dollars of gain if single or 500,000 dollars if married filing jointly. Gains beyond the exclusion are taxable, so keep records of your purchase price and improvements.
Related Articles
10 Common Tax Filing Mistakes That Cost You Money
From missed credits to wrong filing status, these 10 common tax mistakes delay refunds and inflate bills. Learn how to spot and avoid each one before you file.
Tax-Advantaged Accounts: 401(k), IRA, HSA, and 529 Compared
401(k), IRA, HSA, and 529 plans each shelter your money from taxes differently. Compare how they work, 2025 limits, and the smartest order to fund them.
Self-Employment Taxes: What Freelancers Need to Know
Freelancers pay income tax plus 15.3% self-employment tax. Learn how SE tax works, quarterly estimated payments, deductions, and how much to set aside.