What Are Capital Gains and Why They Matter

When you sell an asset—whether it’s shares of stock, a rental property, or a piece of art—the profit you realize is called a capital gain. That profit is subject to federal (and often state) income tax. Understanding how these taxes work is essential for making smart investment decisions, planning for retirement, and minimizing your overall tax liability.

The tax code treats capital gains differently depending on how long you held the asset before selling. Gains on assets held for one year or less are short‑term capital gains; those held for more than one year are long‑term capital gains. This distinction matters because long‑term gains generally enjoy preferential tax rates that are lower than ordinary income tax rates.

Beyond the holding period, your total taxable income and filing status determine how much you owe. Certain assets qualify for special exclusions, and there are well‑established strategies—such as tax‑loss harvesting and donating appreciated securities—that can reduce or even eliminate capital gains taxes altogether.

Short‑Term vs. Long‑Term Capital Gains

Short‑Term Capital Gains

If you sell an asset within 12 months of buying it, any profit is treated as short‑term capital gain. Short‑term gains are added to your ordinary income—wages, self‑employment income, interest, dividends, etc.—and taxed at the same marginal rates that apply to your regular income. As of 2024, those rates range from 10% to 37% depending on your total taxable income and filing status.

For example, if you are a single filer with $60,000 in wages and $10,000 in short‑term stock gains, your total ordinary income becomes $70,000. That $10,000 gain will be taxed at your top marginal rate (22% for 2024), meaning you owe $2,200 on that profit.

Long‑Term Capital Gains

Hold an asset for more than one year and one day, and you unlock significantly lower tax rates. Long‑term capital gains tax brackets are separate from ordinary income brackets. For 2024, the long‑term capital gains rates are:

  • 0% for single filers with taxable income up to $47,025; married filing jointly up to $94,050; head of household up to $63,000.
  • 15% for single filers with income between $47,026 and $518,900; married joint between $94,051 and $583,750; head of household between $63,001 and $518,900.
  • 20% for single filers with income above $518,900; married joint above $583,750; head of household above $518,900.

These thresholds are adjusted annually for inflation. For 2025, they will rise slightly. Note that high earners (modified adjusted gross income over $200,000 for single filers or $250,000 for married couples) also owe an additional 3.8% Net Investment Income Tax on the lesser of net investment income or the amount by which MAGI exceeds those thresholds.

Calculating a Capital Gain (or Loss)

The formula is straightforward:

Capital Gain = Sale Price – (Purchase Price + Adjustments)

“Adjustments” include commissions, broker fees, improvement costs (for real estate), and any other expenses directly tied to the acquisition or sale of the asset. For stocks, if you use a brokerage, the platform usually tracks your cost basis (purchase price plus any reinvested dividends) and reports it on Form 1099‑B. For real estate, you must also account for depreciation recapture—depreciation claimed (or allowable) reduces your cost basis, potentially increasing the taxable gain.

Example: You buy 100 shares of XYZ Corp at $50 per share, paying a $10 commission. Your cost basis is $5,010 ($5,000 + $10). Two years later you sell all 100 shares at $80 per share, paying a $15 commission. Your net proceeds are $7,985 ($8,000 – $15). Your long‑term capital gain is $2,975 ($7,985 – $5,010). At the 15% rate, you owe $446.25 in federal capital gains tax (plus potential NIIT if applicable).

Exemptions, Exclusions, and Special Rules

The IRS offers several important ways to reduce or avoid capital gains taxes.

Primary Residence Exclusion (Section 121)

If you sell your main home, you may exclude up to $250,000 of gain ($500,000 for married couples filing jointly) from your income. To qualify, you must have owned and lived in the home for at least two of the five years before the sale. This exclusion can be used once every two years. If you exceed the gain limit, the excess is taxed at long‑term capital gains rates (assuming you held the home more than one year).

1031 Like‑Kind Exchanges

Real estate investors can defer capital gains taxes by swapping one investment property for another of “like kind.” Under Section 1031, you must use a qualified intermediary, identify a replacement property within 45 days, and close within 180 days. The basis of the new property is adjusted to reflect the deferred gain. This strategy is available only for real estate held for business or investment—not for personal residences or stocks.

Step‑Up in Basis at Death

When you inherit an asset, its cost basis is “stepped up” to fair market value on the date of the decedent’s death (or six months later if the estate uses the alternate valuation date). This means any appreciation that occurred during the decedent’s lifetime escapes capital gains tax entirely. For example, if your grandfather bought stock for $10,000 and it is worth $100,000 when he dies, your basis becomes $100,000. If you sell immediately, you owe no capital gains tax. (Note: The step‑up in basis may be modified by future legislation, but it remains current law.)

Charitable Donations of Appreciated Assets

Donating long‑term appreciated stock or real estate directly to a qualified charity allows you to deduct the full fair market value (subject to AGI limits) and avoid paying any capital gains tax on the appreciation. You cannot take the deduction if you sell the asset first and donate the cash—doing so would trigger the tax. For donors looking to maximize impact, this is one of the most tax‑efficient strategies available.

Qualified Small Business Stock (QSBS) Exclusion

Under Section 1202, if you hold stock in a qualified small business C corporation (one with less than $50 million in gross assets at issuance) for more than five years, you may exclude up to 100% of the gain (up to $10 million or 10 times your basis, whichever is greater) from federal income tax. Limitations apply based on when the stock was acquired (gain exclusion percentages: 50% for stock acquired before Feb. 18, 2009; 75% for Feb. 18, 2009–Sep. 27, 2010; 100% for stock acquired after Sep. 27, 2010).

Tax‑Loss Harvesting and the Wash‑Sale Rule

If you have capital losses—for instance, you sold a stock at a loss—you can use those losses to offset capital gains. If total losses exceed total gains, you can deduct up to $3,000 (or $1,500 if married filing separately) of the net loss against ordinary income each year. Any remaining losses can be carried forward indefinitely.

To prevent taxpayers from manufacturing losses for tax benefits, the wash‑sale rule disallows a loss deduction if you buy a “substantially identical” security within 30 days before or after the sale. The disallowed loss is added to the basis of the repurchased stock. This rule applies to stocks, options, ETFs, and mutual funds, but not to real estate or other assets.

Assets That Receive Special Treatment

While stocks, bonds, and real estate are the most common capital‑gain assets, others have unique rules:

  • Collectibles (art, antiques, coins, precious metals, fine wine) are taxed at a maximum rate of 28% for long‑term gains, not the standard 15% or 20%.
  • Depreciable real estate (rental or business property) is subject to depreciation recapture, taxed at a maximum 25% rate on the portion of gain attributable to prior depreciation.
  • Cryptocurrency is treated as property for tax purposes. Selling or swapping crypto triggers a capital gain or loss. Holding for more than a year qualifies for long‑term rates. The IRS has issued guidance on cost‑basis methods (FIFO, specific identification) and requires reporting on Form 8949 and Schedule D.

State and Local Considerations

Many states tax capital gains as ordinary income, meaning you will pay state income tax on top of federal taxes. Some states (like California, New York, and New Jersey) have relatively high top marginal rates, while others (Texas, Florida, Nevada, South Dakota, Washington, Wyoming) do not impose a state income tax. If you move to a state with no income tax, consider selling appreciated assets after the move to avoid state tax. But be aware of “exit taxes” in certain states (e.g., California) that may tax gains accrued while a resident.

Recent and Potential Legislative Changes

As of early 2025, the capital gains tax structure remains as described above. The Inflation Reduction Act of 2022 increased IRS enforcement funding and introduced a 1% excise tax on stock buybacks, but it did not alter capital gains rates. However, proposed changes—such as taxing unrealized gains for ultra‑high‑net‑worth individuals or increasing the top long‑term rate from 20% to 25%—have been discussed in Congress. While no such law has passed, taxpayers should stay informed, especially if planning large asset sales.

The IRS provides the latest brackets and rules on its Topic No. 409 page, and detailed instructions for reporting can be found in Schedule D instructions.

Reporting Capital Gains on Your Tax Return

To report capital gains and losses, you generally need to:

  1. Receive Form 1099‑B (or similar statement) from your broker, showing proceeds and cost basis for each sale.
  2. Complete Schedule D (Form 1040), summarizing total gains and losses. Part I is for short‑term, Part II for long‑term. If you have many transactions, you may attach a supporting statement.
  3. Calculate the net capital gain or loss. Transfer the result to the appropriate line on Form 1040.
  4. If you owe the Net Investment Income Tax, also complete Form 8960.
  5. Keep records of all purchase and sale confirmations, dividend reinvestments, and adjustments to basis (e.g., stock splits, returns of capital).

Tax software and many online brokerages automatically populate Schedule D. However, you are responsible for ensuring accuracy—errors can lead to IRS notices or penalties.

Practical Strategies to Minimize Capital Gains Taxes

  • Hold for the long term — Aim to keep assets more than one year to qualify for lower rates.
  • Use tax‑advantaged accounts — IRAs, 401(k)s, and 529 plans allow investments to grow tax‑free or tax‑deferred; capital gains inside these accounts are not taxed until withdrawal (or never, in Roth accounts).
  • Offset gains with losses — At year‑end, review your portfolio and sell losers to realize losses that can offset winners.
  • Donate appreciated assets — Instead of selling stock and giving cash, donate the stock directly to charity to skip the tax and claim a deduction.
  • Consider installment sales — If selling a business or large property, spreading payments over multiple years may keep you in a lower bracket.
  • Time your sales — If your income is unusually low in a given year (e.g., after retirement but before RMDs begin), selling appreciated assets at the 0% rate can be highly beneficial.

Conclusion

Capital gains taxes are a key element of the U.S. tax system that affects nearly every investor and homeowner. By grasping the difference between short‑term and long‑term rates, taking advantage of exclusions like the primary residence exemption, and employing strategies such as tax‑loss harvesting and charitable giving, you can significantly reduce your tax burden. Because tax laws are subject to change and individual circumstances vary widely, consulting a qualified tax professional or certified financial planner is wise before making major decisions. For further reading, the IRS Capital Gains and Losses page and Investopedia’s Capital Gains Tax guide provide reliable, up‑to‑date information.