Capital gains taxes apply when you sell an asset for more than you paid. Here’s how they work, the critical difference between short and long-term rates, and legal strategies to minimize them.
Educational content only — not personalized financial, legal, or tax advice.
Capital gains tax is the tax on profit from selling an asset — a stock, a bond, real estate, a business, or other investment — for more than you paid for it. The profit is called a capital gain; the original purchase price is called the cost basis. If you bought 100 shares of a stock at $50 and sold at $80, your capital gain is $3,000 ($30 per share × 100 shares). That $3,000 is taxable income — but how it's taxed depends critically on how long you held the asset.
Understanding capital gains taxation changes investment decisions in meaningful ways. It affects when to sell, which accounts to hold which assets in, how to handle losses, and whether to donate appreciated assets versus cash. These are not obscure tax planning moves — they are mainstream decisions with real dollar consequences for anyone who invests. See tax basics, retirement accounts deep dive, and index funds vs active investing).
The holding period — how long you owned the asset before selling — determines the tax rate:
Short-term capital gains (assets held one year or less) are taxed as ordinary income, at the same marginal rates as your salary: 10%, 12%, 22%, 24%, 32%, 35%, or 37% depending on your total income. A trader in the 32% bracket paying short-term rates on gains keeps 68 cents of every dollar of profit.
Long-term capital gains (assets held more than one year) are taxed at preferential rates: 0% for single filers with taxable income below approximately $47,025; 15% for most middle and upper-middle income earners; and 20% for very high earners (taxable income above ~$518,900 for single filers in 2024). A long-term investor in the 22% ordinary income bracket pays only 15% on long-term gains — a 7-percentage-point difference that compounds significantly over time.
The practical rule: hold investments for more than one year whenever possible. The difference between a 22% short-term rate and a 15% long-term rate on a $20,000 gain is $1,400 — simply by waiting a few extra months.
When investments decline in value, selling them at a loss generates a capital loss — which can be used to offset capital gains. If you have $10,000 in long-term capital gains and $4,000 in capital losses from other positions, you pay long-term rates only on the net $6,000. If losses exceed gains, up to $3,000 of excess losses can be deducted against ordinary income annually, with remaining losses carried forward to future years.
Tax-loss harvesting — strategically selling losing positions to generate losses that offset gains — is one of the few ways to reduce current-year tax liability without changing your overall investment exposure. After selling, you can immediately reinvest in a similar (but not identical) fund to maintain market exposure. The wash-sale rule prohibits repurchasing the same or substantially identical security within 30 days before or after the sale — selling an S&P 500 ETF and immediately buying a total market ETF is generally acceptable; selling and immediately rebuying the same ETF is not.
Because different accounts have different tax treatment, placing the right assets in the right accounts — asset location — reduces your lifetime tax bill.
High-growth assets (stock index funds) belong in Roth accounts: their gains grow and are withdrawn tax-free, maximizing the benefit of tax-free compounding. Income-generating assets (bonds, REITs, dividend stocks) belong in traditional tax-deferred accounts: the ongoing income is sheltered from current taxation. Tax-efficient assets (broad index funds with low turnover and minimal distributions) are fine in taxable brokerage accounts because they generate minimal taxable events.
This isn't about avoiding taxes illegally — it's about using the accounts Congress explicitly created for tax-advantaged investing in the most efficient sequence. The IRS built these rules; using them as designed is straightforward tax planning.
One of the most significant and least-discussed features of capital gains taxation: when you inherit appreciated assets, your cost basis is "stepped up" to the fair market value at the date of the original owner's death. If your parent bought stock for $10,000 that is worth $200,000 at their death and you inherit it, your basis is $200,000 — not $10,000. If you immediately sell at $200,000, you owe zero capital gains tax on $190,000 of appreciation.
This rule has enormous estate planning implications. Highly appreciated assets held until death pass to heirs with the embedded gains permanently erased. Selling those same assets during life triggers the full capital gains tax. For long-term holders of appreciated real estate, stocks, or business interests, this rule is one of the most powerful wealth transfer tools in the tax code. See estate planning basics) and why the tax code is the way it is).