Skip to Main Content

Investor Basics

Capital Gains

A capital gain is the profit realized when a capital asset such as stock or real estate is sold for more than its adjusted cost basis.
Also Called
  • Capital Gain
By InsiderFinance TeamUpdated Sources & Methodology

Calculate the $990 Capital Gain

Each lot has its own acquisition date. Both exceed one year in this example.
ItemAmountHolding Period
Original-Lot Basis$2,00524 months
Reinvested-Lot Basis$6018 months
Combined Basis$2,065Both long-term
Net Sale Proceeds$3,055Sale of all 102 shares
Net Gain$990Long-term
Each lot has its own acquisition date. Both exceed one year in this example.
On This Page
  1. What are capital gains?
  2. How to calculate capital gains: a two-lot example
  3. Short-term vs long-term capital gains and netting
  4. Net investment income tax on capital gains
  5. Capital gains by instrument and account type
  6. Capital gains records: Form 8949 and Schedule D
  7. Limitations of capital gain calculations
  8. Bottom line
  9. FAQ

Key Takeaways

  • A capital gain equals net sale proceeds minus the adjusted cost basis of the asset that was sold.
  • A stock gain becomes taxable when you sell or otherwise dispose of the shares. Section 1256 contracts open at year end are taxed as if sold, and a fund’s capital gain distribution is taxable even when you keep the shares.
  • The IRS treats an asset held more than one year as long-term, and long-term gains generally receive lower rates than ordinary income.
  • Capital losses offset gains through tax netting. An individual’s net loss then reduces other income up to $3,000 annually, or $1,500 for married filing separately.
  • Use the adjusted basis of the shares sold. Reinvestments create additional lots, while splits reallocate existing basis across shares.

What are capital gains?

Capital gains are profits realized when a capital asset, such as stock or real estate, is sold for more than its adjusted cost basis. The gain equals net proceeds after selling costs minus the basis of the shares or property disposed of, and for most assets the holding period decides whether it is short-term or long-term.

A rise in a stock you hold stays unrealized until you sell or otherwise dispose of it. Section 1256 contracts open at year end are taxed as if sold, and funds pass the gains they realize to shareholders as distributions.

Formula

Capital gain = (Sale price − selling costs) − adjusted cost basis
  • Sale price is the gross amount received for the asset before commissions and transfer fees.
  • Adjusted cost basis starts with purchase price plus acquisition costs, then adds capitalized improvements and subtracts items such as depreciation.
  • A negative result is a capital loss rather than a gain.

How to calculate capital gains: a two-lot example

An investor bought 100 XYZ shares at $20 with a $5 commission twenty-four months before sale. A $60 dividend reinvestment bought two more shares eighteen months before sale. The investor sells all 102 shares at $30 with a $5 sale commission.

  • Original basis: 100 × $20.00 + $5 = $2,005
  • Reinvested dividend adds basis: $2,005 + $60 = $2,065 adjusted basis
  • Net proceeds: 102 × $30.00 − $5 = $3,055
  • Capital gain: $3,055 − $2,065 = $990

The original lot has $2,005 basis and the reinvested lot has $60 basis. Net proceeds of $3,055 less total basis of $2,065 produce $990 gain. Both lots were held more than one year, so their results receive long-term classification.

The example has two lots. One hundred shares bought at $20 plus a $5 commission have $2,005 basis. Two shares acquired by reinvesting $60 have $60 basis.

Selling all 102 shares at $30 produces $3,060 gross proceeds and $3,055 after the $5 sale commission. Subtract $2,065 total basis to get $990 gain.

The original shares were held twenty-four months and the reinvested shares eighteen months. Both exceed one year, supporting long-term classification. Each lot’s own acquisition date determines its holding period.

Short-term vs long-term capital gains and netting

For ordinary stock transactions, holdings of more than one year receive long-term treatment; holdings of one year or less receive short-term treatment. Net gains and losses within each category, then combine the results under Schedule D.

Most net long-term capital gains use the 0%, 15% or 20% federal schedule. Collectibles, specified small-business-stock gains and unrecaptured section 1250 gain have separate maximum-rate rules. Short-term net gains use ordinary income rates.

An individual’s net capital loss can reduce other income by up to $3,000 annually, or $1,500 for married filing separately. The carryover calculation determines the unused amount and character.

Net investment income tax on capital gains

NIIT applies 3.8% to the smaller of net investment income and the excess of modified adjusted gross income over the filing threshold. The thresholds are $200,000 for single or head of household, $250,000 for joint filers or qualifying surviving spouses, and $125,000 for married filing separately.

Capital-gain bracket thresholds and NIIT thresholds follow different rules. Use the applicable tax schedule for the gain and Form 8960 for the separate NIIT calculation.

Capital gains by instrument and account type

Section 1256 contracts use their mark-to-market and 60/40 character rules. Fund capital gain distributions follow the fund-reporting rules. Retirement-account gains and withdrawals follow the account’s treatment.

Record each trade’s instrument type next to its price, quantity, proceeds and basis, because for some contracts the instrument overrides the holding period: a Section 1256 contract gets 60/40 treatment however long it was held.

Capital gains records: Form 8949 and Schedule D

Match sales with the identified lots, acquisition costs, reinvestments, corporate actions and other basis adjustments. Reconcile broker reports with the relevant Form 8949 and Schedule D entries.

For tax-loss harvesting, combine the loss recognition and wash-sale analysis with this netting process. Choose which lot to sell by its basis and holding period; the loss counts in this netting only when the sale happens in a taxable account.

Limitations of capital gain calculations

  • Keep the basis record complete. Reinvestments, splits and other corporate actions change basis, and leaving out a reinvested lot’s basis overstates the gain.
  • Check the instrument before the holding period. Section 1256 contracts get 60/40 treatment however long they were held, and collectibles and qualified small-business stock have their own maximum rates.
  • Estimate the tax after netting. A gain is calculated per sale, and the tax owed depends on the year’s other gains and losses, the rate schedule and any NIIT.
  • Sales inside a retirement account stay out of this netting. The account taxes withdrawals under its own rules, so price a withdrawal by the account’s treatment.

Bottom line

A capital gain is net sale proceeds above adjusted basis, and the holding period, instrument and account decide how it is taxed. Track each lot’s basis and acquisition date, net gains and losses by category, and check NIIT and the instrument’s own rules before estimating the tax on a sale.

Clear answers

Frequently Asked Questions

Sources and Further Reading

  1. IRS Publication 550: Contract and distribution character
  2. IRS: Net investment income tax
  3. IRS Topic No. 409, Capital Gains and Losses
  4. IRS Publication 551, Basis of Assets
  5. IRS Topic No. 701, Sale of Your Home
  6. IRS Topic No. 559, Net Investment Income Tax

How entries are sourced, calculated and updated: editorial methodology.

Continue learning