Savvy Nickel LogoSavvy Nickel
Ctrl+K

Capital Gains Tax Explained: What Happens When You Sell Investments

Every time you sell a stock, fund, property, or crypto at a profit, a tax bill can follow. Here is how capital gains tax works, what the rates are in 2026, and how to legally reduce what you owe.

BY SAVVY NICKEL TEAM ON MARCH 6, 2026
Share:Email
Capital Gains Tax Explained: What Happens When You Sell Investments

You buy a stock at $40 per share. A year later it is worth $65. You sell. That $25 gain is not yours to keep entirely. Part of it belongs to the IRS in the form of capital gains tax.

Understanding how that tax is calculated, what rate applies, and what you can do to minimize it is one of the most practical pieces of tax knowledge for anyone who invests. This guide explains all of it, including the 2026 rates and how different assets are treated.

What Is a Capital Gain?

A capital gain is the profit you make when you sell a capital asset for more than you paid for it. Capital assets include:

  • Stocks, ETFs, and mutual funds
  • Bonds
  • Real estate (including your primary home, with special rules)
  • Cryptocurrency and other digital assets
  • Collectibles (art, coins, baseball cards)
  • Business interests

The amount you originally paid for the asset is called your cost basis. The gain is the selling price minus the cost basis, minus any selling costs (brokerage commissions, for example).

Gain = Sale Price - Cost Basis - Selling Expenses

If the asset sold for less than the cost basis, you have a capital loss. Losses can offset gains and in some cases reduce ordinary income, which is the foundation of tax loss harvesting (covered separately in Tax Loss Harvesting: A Simple Strategy Most Investors Ignore).

Short-Term vs Long-Term: The Most Important Distinction

The tax rate applied to your capital gain depends almost entirely on how long you held the asset before selling.

  • Short-term capital gains: Assets held for one year or less. Taxed as ordinary income at your regular income tax bracket rate (10%, 12%, 22%, 24%, 32%, 35%, or 37% depending on your income).
  • Long-term capital gains: Assets held for more than one year. Taxed at preferential rates of 0%, 15%, or 20% depending on your income.

This distinction is one of the most significant in the entire tax code. Holding an investment for one day longer than a year can meaningfully reduce your tax bill.

Example: You sell a stock with a $10,000 gain.

  • If held 11 months: short-term. At a 22% marginal rate, you owe $2,200.
  • If held 13 months: long-term. At the 15% long-term rate, you owe $1,500.
  • Difference: $700 saved by waiting two more months.

2026 Long-Term Capital Gains Tax Rates

Long-term capital gains rates for the 2025 tax year (filed in 2026), based on taxable income:

Single Filers:

RateTaxable Income Range
0%$0 to $48,350
15%$48,351 to $533,400
20%Over $533,400

Married Filing Jointly:

RateTaxable Income Range
0%$0 to $96,700
15%$96,701 to $600,050
20%Over $600,050

Source: IRS Revenue Procedure 2024-61.

These thresholds apply to your total taxable income, including ordinary income. Long-term capital gains stack on top of ordinary income when determining which rate applies to the gains, but the gains themselves are taxed at the preferential rates.

The Net Investment Income Tax (NIIT)

High earners face an additional 3.8% Net Investment Income Tax on top of the regular capital gains rate. This applies to the lesser of:

  • Net investment income (capital gains, dividends, interest, rental income), or
  • The amount by which your Modified Adjusted Gross Income exceeds $200,000 (single) or $250,000 (married filing jointly)

So for a single filer with income above $200,000, long-term capital gains are effectively taxed at 18.8% (15% + 3.8%) or 23.8% (20% + 3.8%), not just the headline rates above.

Cryptocurrency and Digital Assets

Cryptocurrency is treated as property by the IRS, not currency. Every taxable event generates a capital gain or loss:

  • Selling crypto for dollars: taxable event
  • Trading one cryptocurrency for another: taxable event
  • Using crypto to buy goods or services: taxable event
  • Receiving crypto as payment for work: taxable as ordinary income at receipt, then capital gains apply when sold

The same short-term and long-term rules apply. Bitcoin held for 14 months and sold at a gain is a long-term capital gain. Ethereum traded for a different token after 8 months is a short-term capital gain.

The IRS requires reporting of crypto transactions on your tax return. Starting with the 2025 tax year, major exchanges are required to issue Form 1099-DA (Digital Asset) reporting your transactions, similar to how brokerages report stock sales. This significantly increases IRS visibility into crypto activity.

Keeping detailed records of every crypto transaction including date acquired, amount paid, date sold, and amount received is essential.

Real Estate Capital Gains

Selling a primary residence has special rules. The Section 121 exclusion allows single filers to exclude up to $250,000 of gain, and married filing jointly couples to exclude up to $500,000 of gain, from a home sale. To qualify:

  • You must have owned the home for at least two of the last five years
  • You must have used it as your primary residence for at least two of the last five years
  • You have not used this exclusion in the last two years

Gains above the exclusion are taxed at long-term capital gains rates (assuming you held the home more than a year).

Investment properties and second homes do not qualify for the Section 121 exclusion. All gains are taxed. Additionally, depreciation previously claimed on an investment property is "recaptured" at a 25% tax rate, which can generate a significant tax bill even when the long-term capital gains rate applies to the remaining gain.

Cost Basis: The Detail That Changes Everything

Your cost basis determines the size of your gain. Getting it right matters, especially for assets held through dividend reinvestment, stock splits, or multiple purchases over time.

For stocks: The cost basis of a single purchase is straightforward: the price paid plus any commissions. If you purchased the same stock multiple times at different prices, you need to track each lot. When you sell a partial position, you can specify which shares you are selling (specific lot identification), which can minimize your gain.

For mutual funds with reinvested dividends: Each dividend reinvestment creates a new lot with its own cost basis and holding period. Over many years, this creates dozens of small lots. Brokerage firms are required to track and report cost basis for shares purchased after January 1, 2012 (the coverage start date for most securities). Older shares may require your own records.

Average cost basis method: For mutual funds, you can elect to use an average cost basis (all shares averaged together). This simplifies record-keeping but eliminates the ability to strategically sell specific lots.

For inherited assets: Assets inherited at death receive a "stepped-up basis" equal to the fair market value at the date of death. This eliminates capital gains tax on the appreciation that occurred during the deceased person's lifetime. Heirs pay capital gains only on appreciation after the date of inheritance.

Strategies to Legally Reduce Capital Gains Tax

Hold Investments Longer Than One Year

The simplest and most reliable strategy. Waiting until the one-year mark converts a short-term gain taxed at ordinary income rates to a long-term gain taxed at 0%, 15%, or 20%.

Harvest Losses to Offset Gains

Capital losses can be used to offset capital gains dollar for dollar. If you have $8,000 in gains and $3,000 in losses in the same year, your net taxable gain is $5,000. If losses exceed gains, up to $3,000 of excess losses can offset ordinary income. Unused losses carry forward to future years indefinitely. This is tax loss harvesting. See Tax Loss Harvesting: A Simple Strategy Most Investors Ignore for the full strategy.

Use Tax-Advantaged Accounts for High-Growth Investments

Assets held inside a Roth IRA, traditional IRA, or 401k do not generate capital gains tax when sold. Rebalancing, taking profits, and reinvesting inside these accounts happens without any current-year tax consequence. Placing high-growth, high-turnover investments inside tax-advantaged accounts and keeping slower-growing, tax-efficient assets in taxable accounts is called asset location and can significantly reduce lifetime tax drag.

Give Appreciated Shares to Charity

Donating appreciated stock directly to a qualifying charity instead of cash allows you to deduct the full fair market value of the shares while never paying capital gains tax on the appreciation. If you donate $5,000 worth of stock that you originally bought for $1,500, you deduct $5,000 and the $3,500 gain is never taxed.

Time Gains to Lower-Income Years

If you have a year of significantly lower income (a career transition, a sabbatical, early retirement before Social Security begins), your taxable income may fall into the 0% long-term capital gains bracket. Strategically realizing gains in that year captures them completely tax-free.

Real-World Examples

Example: Fatima, 31, selling ETF shares for a home down payment
Situation: Fatima has been investing in a broad market ETF for several years. She needs $35,000 for a down payment. Her current taxable income is $62,000, and she has $12,000 in unrealized gains on the shares she needs to sell.
Short-term scenario: If she had held some shares less than a year and needed to sell them, those gains would be taxed at 22% (her marginal income bracket). Tax on $12,000: $2,640.
Long-term reality: All shares are held over a year. At $62,000 taxable income plus $12,000 in long-term gains, she is in the 15% long-term rate bracket. Tax on $12,000: $1,800. Savings over short-term: $840.
Example: David, 58, selling rental property
Situation: David bought a rental property in 2010 for $180,000. He claimed $60,000 in depreciation deductions over 15 years. He sells it for $360,000.
Gain calculation: Sale price $360,000 - adjusted basis ($180,000 - $60,000 depreciation = $120,000) = $240,000 total gain.
Tax breakdown: $60,000 of depreciation recapture taxed at 25% = $15,000. Remaining $180,000 is long-term capital gain taxed at 15% (assuming income in that bracket) = $27,000. Total capital gains tax: $42,000 on a $180,000 appreciation.
Note: A 1031 exchange could have deferred this tax by reinvesting the proceeds into another qualifying investment property.

What to Report on Your Tax Return

Capital gains and losses are reported on Schedule D (Capital Gains and Losses) and Form 8949 (Sales and Other Dispositions of Capital Assets). Your brokerage issues a Form 1099-B reporting each sale including the proceeds and, for covered securities, the cost basis.

Tax software imports this data automatically if you connect your brokerage account or upload the 1099-B. Review the imported data carefully, particularly cost basis for older shares that may not be covered.

This post is for informational purposes only and does not constitute tax or financial advice. Capital gains tax rates, thresholds, and rules are subject to legislative change. Cryptocurrency tax rules are an evolving area. Verify current rates at irs.gov and consult a qualified tax professional for complex investment tax situations.

Share:Email

Savvy Nickel Team

Financial education expert dedicated to making complex money topics simple and accessible for everyone.