Skip to main content
Glossary · Taxes

Capital Gains Tax

Capital gains tax is the federal and potentially state tax resulting from net taxable gains after basis, holding period, losses, income, and special rules are applied.

Formula

Federal capital-gain tax depends on net gain × applicable rate after basis, holding-period, loss-netting, taxable-income, and special-rate rules

The full explanation

Capital gains tax in plain English

Capital gains tax is not a single flat charge on sale proceeds. Federal tax depends on the gain after adjusted basis, whether it is short-term or long-term, other gains and losses, taxable income, filing status, and the kind of asset.

Keep reading

State income tax may also apply under a different framework. Some sales trigger additional federal rules, including the net investment income tax or depreciation recapture.

The correct sequence is to calculate the gain, net all capital transactions, determine taxable income, and then apply the relevant rates.

Tax applies to gain, not proceeds

Acquisition costs, selling expenses, reinvested distributions, returns of capital, improvements, depreciation, and other adjustments can change basis or amount realized.

Poor basis records can cause an overstated tax bill. They can also create an understated return, penalties, and interest. Reconcile broker information with original records before calculating tax.

Short-term gains use ordinary rates

A net gain from assets held one year or less is generally short-term and taxed at the same federal rates that apply to ordinary taxable income.

Keep reading

That does not mean every short-term gain is taxed at the taxpayer's top bracket. The progressive rate schedule applies in layers, and deductions, losses, filing status, and other income all affect the result.

Holding only a few extra days can sometimes change character, but investment risk, transaction terms, and wash-sale issues also matter. Tax should not be the sole reason to keep an unsuitable position.

Long-term gains use a separate rate schedule

Most net long-term capital gain is subject to federal rates of 0%, 15%, or 20%, based on taxable-income thresholds and filing status. The thresholds are indexed and should be checked for the applicable tax year.

Keep reading

The 0% rate does not mean all taxpayers below a threshold owe no tax on every sale. Ordinary taxable income uses the lower part of the income range first, and long-term gain fills the remaining ranges.

A sale can therefore span more than one long-term rate. Part may fall at 0% and the remainder at 15%, for example.

How capital-gain stacking works

Think of taxable ordinary income as the lower layer and net long-term gain as a layer placed above it. The gain is taxed according to the long-term brackets it occupies.

Tax software worksheets perform the actual calculation because qualified dividends, special-rate gains, deductions, and other items interact with the layers.

Losses can offset gains

Capital losses first offset capital gains under the short-term and long-term netting rules. A net capital loss can generally offset up to $3,000 of other income for an individual, or $1,500 if married filing separately, with unused amounts carried forward.

Keep reading

Realizing a loss may reduce current tax, but the wash-sale rule can defer a loss when substantially identical securities are acquired around the sale.

Tax-loss harvesting should consider portfolio allocation, transaction costs, spreads, future tax rates, and replacement investments—not just the current deduction.

The 3.8% net investment income tax

The net investment income tax, or NIIT, is a separate 3.8% tax that can apply to certain net investment income when modified adjusted gross income exceeds the statutory threshold for the filing status.

Keep reading

Capital gains can be included in net investment income, but the tax is generally imposed on the lesser of net investment income or the excess over the income threshold.

The NIIT is not one of the 0%, 15%, or 20% long-term rates. A taxpayer can owe it in addition to the regular capital-gain tax.

Special maximum rates and recapture

Some long-term gains do not fit entirely within the general rate bands:

  • collectibles gain and certain qualified small-business stock gain can face a maximum 28% rate;
  • unrecaptured Section 1250 gain related to depreciated real property can face a maximum 25% rate; and
  • depreciation recapture on business or rental property may be taxed as ordinary income under separate rules.

The stated percentages are maximum rates, not automatic rates on every dollar. The return calculation and ordinary bracket still matter.

Main-home sales

An eligible taxpayer may exclude up to $250,000 of gain from the sale of a main home, or up to $500,000 on certain joint returns, when ownership, use, and other tests are satisfied.

Keep reading

The exclusion applies to gain, not sale price. Basis generally includes purchase cost and qualifying improvements, while certain depreciation after the home was used for business or rental purposes may not be excludable.

Reduced exclusions and reporting exceptions can apply. Keep purchase, improvement, and closing records for as long as they affect basis.

Retirement and tax-advantaged accounts

Trades inside an IRA or qualified workplace retirement plan generally do not produce current Schedule D capital-gain tax for the owner. The account's distribution rules govern later tax.

Keep reading

Traditional-account taxable distributions are generally ordinary income. Qualified Roth distributions may be tax-free. A taxable brokerage account does not receive that same wrapper.

Asset location can change when tax is recognized, but fees, investment selection, access rules, contribution limits, and diversification remain important.

Estimated tax and withholding

A profitable sale may create tax that wage withholding does not cover. Federal underpayment rules generally examine payments made during the year, not only whether the balance is paid by the return deadline.

Keep reading

Estimated-tax safe harbors, annualized-income methods, and withholding timing can affect penalties. Tax withheld from wages is generally treated differently from an estimated payment for timing purposes.

Model the sale before closing when possible. Reserve cash for federal and state tax instead of reinvesting or spending all proceeds.

State capital-gain tax

Federal long-term rates do not determine state tax. A state may tax gain at ordinary rates, provide exclusions, apply special deductions, or impose no individual income tax.

Keep reading

Residency, property location, part-year moves, and source-income rules can affect which state may tax the gain. Moving after a sale does not necessarily change the source of the transaction.

Use the current state revenue agency guidance for the relevant year and transaction.

Planning before a sale

Useful questions include:

  1. What is the adjusted basis for the exact lot or property?
  2. Will the holding period be short-term or long-term on the sale date?
  3. Are capital-loss carryforwards available?
  4. Will the gain affect NIIT, credits, deductions, Medicare premiums, or other income-based items?
  5. Is an estimated payment needed?
  6. Does the state apply a separate tax?

Spreading sales across tax years, donating appreciated property, or choosing lots may change the outcome, but each strategy has eligibility and documentation requirements.

Common misconceptions

“The broker already withheld the tax.” Brokerage sales often do not include withholding sufficient for the final liability.

Keep reading

“Every long-term gain is taxed at 15%.” The general federal rates are 0%, 15%, and 20%, with income thresholds and exceptions.

“Entering a higher bracket taxes all income more.” Progressive brackets apply only to the portions within each range.

“A 0% gain has no consequence.” It can increase adjusted gross income and affect other tax or benefit calculations.

“Proceeds equal profit.” Adjusted basis and selling costs determine the gain.

Capital gains tax is a return-level calculation. Estimate it with the complete income picture, then preserve the records that make the estimate defensible.

Frequently asked questions

What are the federal long-term capital-gains tax rates?

Most net long-term gain is taxed at 0%, 15%, or 20% according to taxable-income thresholds and filing status, with special categories and additional taxes possible.

Are short-term capital gains taxed differently?

Yes. Net short-term capital gain is generally taxed under the ordinary federal income-tax rate schedule rather than the long-term rate schedule.

More answers (2)

Can I owe tax even if a broker did not withhold?

Yes. Sale proceeds commonly arrive without enough withholding, so a large gain can require an estimated payment to avoid an underpayment penalty.

Is capital gains tax charged on the full sale price?

No. The starting taxable result is generally net amount realized minus adjusted basis, followed by capital-loss netting and other return-level rules.

Sources (4)

Facts checked Updated
  1. IRS — Topic No. 409, Capital Gains and Lossesirs.gov
  2. IRS — Publication 550, Investment Income and Expensesirs.gov
  3. IRS — Questions and Answers on the Net Investment Income Taxirs.gov
  4. IRS — Publication 523, Selling Your Homeirs.gov

Fact-check dates show when the published facts were checked against the cited sources. They do not guarantee that terms have stayed the same.