Capital gains tax is one of the most misunderstood areas of personal taxation. People often avoid selling investments not because they want to hold them, but because they fear an unexpected tax bill. Understanding how capital gains actually work — and the strategies available to reduce them — can improve your investment decisions and save meaningful money.
What Is a Capital Gain?
A capital gain is the profit you realize when you sell a capital asset — stocks, bonds, mutual funds, ETFs, real estate, cryptocurrency, or other investment property — for more than you paid. The amount you originally paid is your "cost basis" (adjusted for things like reinvested dividends or improvements to real property). The difference between your sale price and your cost basis is the gain.
Capital losses occur when you sell for less than your cost basis. These losses can offset capital gains and, in some cases, up to $3,000 of ordinary income per year.
Short-Term vs Long-Term Capital Gains
The single most important variable in capital gains taxation is how long you held the asset before selling.
Short-term capital gains apply to assets held for one year or less. They are taxed at your ordinary income tax rate — the same rate as your salary. In 2025, that ranges from 10% to 37% depending on your income and filing status.
Long-term capital gains apply to assets held for more than one year. They are taxed at preferential rates: 0%, 15%, or 20%, depending on your income.
2025 long-term capital gains tax rates:
- 0%: Taxable income up to $48,350 (single) or $96,700 (married filing jointly)
- 15%: Income from $48,350 to $533,400 (single) or $96,700 to $600,050 (married)
- 20%: Income above these thresholds
The difference between short-term and long-term treatment can be enormous. A $50,000 gain taxed at the short-term rate of 32% costs $16,000 in federal tax. The same gain taxed at the long-term 15% rate costs $7,500. Waiting 12 months and one day to sell can save $8,500.
The Net Investment Income Tax (NIIT)
Higher earners face an additional 3.8% surcharge on investment income called the Net Investment Income Tax. It applies to the lesser of your net investment income or the amount by which your Modified Adjusted Gross Income (MAGI) exceeds $200,000 (single) or $250,000 (married filing jointly).
Combined with the 20% long-term capital gains rate, high earners can face an effective federal rate of 23.8% on capital gains — before any state taxes.
State Capital Gains Taxes
Most states tax capital gains as ordinary income, with no preferential long-term rate. California's top marginal rate is 13.3%, applied to all capital gains. New York tops out at 10.9%. A handful of states — Florida, Texas, Nevada, Washington (for most investments), and a few others — have no income tax and thus no capital gains tax.
State taxes are additive to federal taxes. A California resident in the top federal long-term bracket faces approximately 23.8% federal + 13.3% state = 37.1% effective rate on capital gains. This context is important when evaluating the benefit of tax strategies and the cost of selling investments.
Tax-Loss Harvesting
Tax-loss harvesting is the practice of selling investments that have declined in value to realize a tax loss, then immediately reinvesting in a similar (but not identical) investment to maintain your market exposure.
Capital losses offset capital gains dollar for dollar. If you have $30,000 in gains and $15,000 in losses, you pay tax on only $15,000 of net gains. If your losses exceed your gains, you can deduct up to $3,000 of net losses against ordinary income, with any remaining losses carried forward to future years.
One important rule: the "wash sale" rule prohibits claiming a loss if you repurchase the same or a "substantially identical" security within 30 days before or after the sale. You can sell an S&P 500 ETF at a loss and immediately buy a different S&P 500 ETF (from a different fund family) — these are similar but not substantially identical, so the loss is generally allowed. Consult a tax advisor if you are unsure whether two securities are substantially identical.
Strategic Timing of Gains
0% bracket strategy. If your income is low enough to qualify for the 0% long-term capital gains rate, consider recognising gains intentionally — selling appreciated positions and immediately rebuying them — to "step up" your cost basis without paying any federal tax. This strategy resets your basis at no cost and reduces future taxable gains.
Bunching gains in low-income years. If you expect a low-income year (early retirement, career change, parental leave), that year may offer an opportunity to recognize capital gains at a lower rate than in higher-income years.
Timing around year-end. If you have a large gain to recognize, selling in a year where your other income is unusually low (from a job gap, business losses, or large deductions) reduces the gain's tax cost.
Retirement Accounts and Capital Gains
Capital gains inside tax-advantaged retirement accounts (401k, IRA, Roth IRA) are not taxable as capital gains. All gains in a Traditional IRA or 401k are eventually taxed as ordinary income on withdrawal. Gains in a Roth IRA are never taxed at all if you meet the qualification rules.
This has an important implication: hold your highest-growth assets in Roth accounts, where gains are never taxed. Hold assets with significant dividend income in Traditional accounts, where dividends are not subject to current taxation. Keep assets with frequent trading in tax-advantaged accounts and long-term buy-and-hold positions in taxable accounts.
Understanding capital gains tax does not mean you should let taxes drive all investment decisions. Holding a losing position simply to avoid triggering a gain is poor investment management. But having a basic command of how gains are taxed allows you to time, sequence, and structure sales in ways that legitimately reduce your tax bill over time.