TaxGrader

How Capital Gains Tax Works

Published April 8, 2026

Key Takeaways

  • Capital gains tax applies to the profit from selling assets such as stocks, real estate, and collectibles, with rates depending on how long the asset was held and the taxpayer’s income level.
  • Short-term capital gains (assets held one year or less) are generally taxed at ordinary income tax rates, which may be as high as 37% for the 2024 tax year.
  • Long-term capital gains (assets held longer than one year) typically benefit from preferential tax rates of 0%, 15%, or 20%, depending on taxable income and filing status.
  • Capital losses can generally offset capital gains, and up to $3,000 in net capital losses may be deducted against ordinary income per year, with excess losses carried forward to future tax years.
  • The Net Investment Income Tax (NIIT) may add an additional 3.8% surtax on capital gains for higher-income taxpayers, bringing the effective maximum federal rate on long-term gains to 23.8%.

Capital gains tax is one of the most consequential elements of the federal tax code for investors, homeowners, and business owners. Whether you are selling shares of stock, disposing of rental property, or liquidating a business interest, the tax treatment of your gain (or loss) can significantly affect your after-tax return. Understanding how capital gains are classified, calculated, and taxed is essential for making informed financial decisions. This guide covers the mechanics of capital gains taxation for the 2024 and 2025 tax years, including rate structures, exemptions, common pitfalls, and audit considerations.

What Is a Capital Gain?

A capital gain arises when you sell or exchange a “capital asset” for more than your adjusted basis (generally, the original purchase price plus certain adjustments). Capital assets typically include stocks, bonds, mutual funds, real estate, personal-use property, and collectibles. Certain items, such as inventory held for sale in the ordinary course of business, are generally excluded from capital asset treatment under IRC Section 1221.

The basic formula for calculating a capital gain is straightforward:

Capital Gain = Amount Realized (Sale Price minus Selling Expenses) minus Adjusted Basis

For example, if you purchased 100 shares of stock for $5,000, paid $50 in commission, and later sold them for $8,000 with $50 in selling costs, your capital gain would typically be calculated as follows:

  • Adjusted Basis: $5,000 + $50 = $5,050
  • Amount Realized: $8,000 minus $50 = $7,950
  • Capital Gain: $7,950 minus $5,050 = $2,900

Short-Term vs. Long-Term Capital Gains

The distinction between short-term and long-term capital gains is one of the most important concepts in capital gains taxation. The holding period, which is the length of time you own an asset before selling it, determines which tax rates apply.

Short-Term Capital Gains

Assets held for one year or less before being sold generally produce short-term capital gains. These gains are taxed at the same rates as ordinary income, which range from 10% to 37% for the 2024 tax year (per IRS Revenue Procedure 2023-34). This means a taxpayer in the highest bracket could pay a federal rate of 37% on short-term gains, before accounting for any applicable state taxes.

Long-Term Capital Gains

Assets held for more than one year typically qualify for long-term capital gains treatment, which carries preferential tax rates. For the 2024 tax year, long-term capital gains rates are 0%, 15%, or 20%, depending on taxable income and filing status.

2024 Long-Term Capital Gains Tax Rate Brackets

The following table outlines the long-term capital gains tax rate thresholds for the 2024 tax year, as published in IRS Revenue Procedure 2023-34:

Tax Rate Single Filers Married Filing Jointly Head of Household
0% Up to $47,025 Up to $94,050 Up to $63,000
15% $47,026 to $518,900 $94,051 to $583,750 $63,001 to $551,350
20% Over $518,900 Over $583,750 Over $551,350

For the 2025 tax year, these thresholds are adjusted for inflation. Under IRS Revenue Procedure 2024-40, the 0% rate for single filers generally applies to taxable income up to $48,350, and for married filing jointly up to $96,700.

Practical Example: Long-Term vs. Short-Term Impact

Consider a single filer with $80,000 in taxable income (before capital gains) who realizes a $20,000 gain on a stock sale in 2024:

  • If held for 8 months (short-term): The $20,000 gain is added to ordinary income, bringing total taxable income to $100,000. The gain would generally be taxed at the 22% or 24% marginal ordinary income rate, resulting in approximately $4,400 to $4,800 in federal tax on the gain.
  • If held for 14 months (long-term): The $20,000 gain would typically be taxed at the 15% long-term rate, resulting in approximately $3,000 in federal tax on the gain.

The difference of roughly $1,400 to $1,800 illustrates why holding period planning is often a significant consideration for investors.

The Net Investment Income Tax (NIIT)

Higher-income taxpayers may also be subject to the Net Investment Income Tax, an additional 3.8% surtax on certain investment income, including capital gains. As outlined in IRC Section 1411 and IRS instructions for Form 8960, the NIIT applies when modified adjusted gross income (MAGI) exceeds:

  • $200,000 for single filers
  • $250,000 for married filing jointly
  • $125,000 for married filing separately

These thresholds are not adjusted for inflation, which means more taxpayers may become subject to the NIIT over time. When applicable, the NIIT can bring the effective maximum federal tax rate on long-term capital gains to 23.8% (20% + 3.8%).

Special Capital Gains Rates and Categories

Not all capital gains are taxed uniformly. Certain types of assets carry their own rate structures:

Collectibles

Long-term gains on collectibles (art, antiques, coins, stamps, precious metals, and similar items) are generally taxed at a maximum rate of 28%, which is higher than the standard long-term rates. This rate is specified under IRC Section 1(h)(4) and detailed in IRS Publication 544.

Qualified Small Business Stock (Section 1202)

Gains from the sale of qualified small business stock (QSBS) held for more than five years may be partially or fully excluded from federal income tax, depending on when the stock was acquired. For stock acquired after September 27, 2010, up to 100% of the gain may be excludable, subject to limitations. However, the rules for QSBS qualification are complex, and not all small business stock meets the requirements outlined in IRC Section 1202.

Unrecaptured Section 1250 Gain

When depreciable real property is sold at a gain, a portion of the gain attributable to previously claimed depreciation deductions is typically taxed at a maximum rate of 25% rather than the standard long-term rates. This “unrecaptured Section 1250 gain” is a common consideration in the sale of rental properties and commercial real estate (per IRS Publication 544 and the instructions for Schedule D).

Capital Losses and the $3,000 Deduction Limit

Capital losses occur when you sell an asset for less than your adjusted basis. The tax code generally allows capital losses to offset capital gains dollar-for-dollar. When net capital losses exceed net capital gains in a given year, up to $3,000 ($1,500 for married filing separately) of the excess loss may be deducted against ordinary income, as specified in IRC Section 1211 and IRS Publication 550.

Any remaining unused losses are carried forward to future tax years indefinitely, maintaining their character as short-term or long-term losses.

Example: Offsetting Gains with Losses

Suppose in 2024 you realize a $12,000 long-term capital gain from selling Stock A and a $7,000 long-term capital loss from selling Stock B. Your net long-term gain would be $5,000, which would typically be taxed at long-term rates. If instead your loss on Stock B was $15,000, your net capital loss would be $3,000, of which the full $3,000 could generally be deducted against ordinary income in 2024, with no remaining carryforward.

The Wash Sale Rule: A Critical Limitation

Taxpayers who sell securities at a loss and repurchase the same or “substantially identical” securities within 30 days before or after the sale may trigger the wash sale rule under IRC Section 1091. When this rule applies, the loss is disallowed for the current tax year (though it is typically added to the basis of the replacement shares). The IRS monitors wash sale violations, and failing to account for them properly is a known audit trigger, particularly for active traders. IRS Publication 550 provides detailed guidance on this rule.

The Primary Residence Exclusion (Section 121)

One of the most valuable capital gains provisions for individual taxpayers is the primary residence exclusion under IRC Section 121. Homeowners who sell their primary residence may exclude up to:

  • $250,000 in capital gains for single filers
  • $500,000 in capital gains for married filing jointly

To qualify, the taxpayer must generally have owned and used the home as a principal residence for at least two of the five years preceding the sale. This exclusion may typically be used once every two years.

However, there are important limitations. Periods of non-qualified use (such as time the property was rented out) that occurred after January 1, 2009, may reduce the excludable gain on a pro-rata basis. Additionally, gains attributable to depreciation claimed on a home office are generally not eligible for the exclusion. IRS Publication 523 provides comprehensive details on qualification requirements and partial exclusion scenarios.

Reporting Capital Gains and Losses

Capital gains and losses are generally reported on Schedule D (Form 1040) and Form 8949. Brokerage firms typically issue Form 1099-B, which reports proceeds from sales of securities. Since 2011, brokers have been required to report cost basis for most covered securities, but taxpayers remain responsible for verifying accuracy.

Common reporting errors that may increase audit risk include:

  • Failing to report transactions that appear on Form 1099-B (the IRS receives copies and uses automated matching programs)
  • Incorrectly calculating basis, especially for inherited assets, gifted property, or shares acquired through reinvested dividends
  • Mischaracterizing short-term gains as long-term gains
  • Overlooking wash sale adjustments

Basis Considerations and Common Complexities

Inherited Property

Property received through inheritance generally receives a “stepped-up” basis equal to the fair market value at the date of the decedent’s death (per IRC Section 1014). This can significantly reduce or eliminate capital gains tax when the inherited asset is subsequently sold. For example, if a parent purchased stock for $10,000, and the stock was worth $100,000 at the date of death, the heir’s basis would typically be $100,000, not $10,000.

Gifted Property

For property received as a gift, the recipient generally takes the donor’s basis (known as “carryover basis”) under IRC Section 1015. If the fair market value at the time of the gift is lower than the donor’s basis, special rules may apply for determining loss, which can create unexpected tax outcomes.

Mutual Funds and ETFs

Investors in mutual funds may receive capital gains distributions even if they did not sell any shares. Funds that sell holdings at a gain are required to distribute those gains to shareholders, who must then report them as capital gains on their tax returns. This is a frequently misunderstood aspect of fund investing and can result in unexpected tax liabilities, particularly in years of significant portfolio rebalancing by the fund manager. IRS Publication 550 addresses the treatment of mutual fund distributions in detail.

State Capital Gains Taxes

In addition to federal capital gains tax, most states impose their own income tax on capital gains. According to the Tax Foundation’s 2024 State Individual Income Tax Rates and Brackets report, state tax rates on capital gains income vary widely. Some states, like California, tax capital gains as ordinary income at rates up to 13.3%, while others, such as Florida, Texas, and Nevada, impose no state income tax. A small number of states, including New Hampshire and Washington, have enacted taxes that apply to certain investment income but not to all forms of capital gains. The combined federal and state tax burden on capital gains can therefore vary significantly depending on state of residence.

Estimated Tax Payments and Timing Considerations

Taxpayers who realize significant capital gains during the year may need to make quarterly estimated tax payments to avoid underpayment penalties under IRC Section 6654. This is particularly relevant for individuals who receive most of their income from investments, as there may not be sufficient withholding from wages to cover the additional tax liability. IRS Form 1040-ES provides worksheets for calculating estimated payments.

One planning consideration involves the annualized income installment method, which may allow taxpayers who realize gains late in the year to reduce earlier quarterly estimated payments. However, this method involves additional complexity and recordkeeping requirements (per IRS Publication 505).

Audit Risks and Red Flags

While capital gains reporting is routine for millions of taxpayers, certain situations may increase the likelihood of IRS scrutiny:

  • Large discrepancies between 1099-B amounts and reported gains or losses: The IRS automated matching system (known as the Automated Underreporter program) compares reported income with information returns filed by brokers.
  • Frequent use of tax-loss harvesting without regard for wash sale rules: Aggressive loss harvesting strategies that are not properly adjusted for wash sales are a recognized audit concern.
  • Claiming the Section 121 exclusion on homes with limited occupancy: The IRS may request documentation proving the ownership and use tests were met, particularly for homes that were previously rental properties.
  • Large capital gains without corresponding estimated tax payments: This may trigger underpayment penalty assessments.
  • Claiming QSBS exclusions without adequate documentation: The IRS has increased scrutiny of Section 1202 exclusion claims, and taxpayers may need to demonstrate that the issuing corporation met all qualification requirements at the time of stock issuance.

Recent and Upcoming Changes to Watch

Capital gains tax policy is frequently discussed in legislative proposals. As of early 2025, the long-term capital gains rate structure, the Section 121 exclusion, and the NIIT thresholds remain in place as described above. However, various proposals have been introduced in Congress that could alter capital gains rates, modify or eliminate the stepped-up basis at death, or adjust the NIIT. Taxpayers with significant unrealized gains may want to monitor legislative developments and consider consulting a qualified tax professional about potential planning implications.

Data Sources

  • IRS Revenue Procedure 2023-34: 2024 tax year inflation adjustments for capital gains brackets and standard deductions
  • IRS Revenue Procedure 2024-40: 2025 tax year inflation adjustments
  • IRS Publication 544 (Sales and Other Dispositions of Assets): Guidance on capital asset classification, collectibles rates, and depreciation recapture
  • IRS Publication 550 (Investment Income and Expenses): Rules for capital gains and losses on securities, wash sales, and mutual fund distributions
  • IRS Publication 523 (Selling Your Home): Primary residence exclusion requirements and calculations
  • IRS Publication 505 (Tax Withholding and Estimated Tax): Estimated payment requirements and the annualized income installment method
  • IRS Form 8960 Instructions: Net Investment Income Tax thresholds and calculations
  • IRC Section 1(h): Long-term capital gains rate structure
  • IRC Section 121: Primary residence gain exclusion
  • IRC Section 1014: Stepped-up basis for inherited property
  • IRC Section 1015: Basis of property acquired by gift
  • IRC Section 1091: Wash sale rule
  • IRC Section 1202: Qualified small business stock exclusion
  • IRC Section 1211: Limitation on capital losses
  • IRC Section 1411: Net Investment Income Tax
  • IRC Section 6654: Failure to pay estimated income tax
  • Tax Foundation, “State Individual Income Tax Rates and Brackets, 2024”

Disclosure: This content is AI-assisted and human-reviewed. Data is sourced from IRS publications, Tax Foundation, and other official sources.

Disclaimer: This is educational content, not tax advice. Consult a qualified tax professional for advice specific to your situation.

Related Resources