Skip to content
Taxes

Capital Gains and Cost Basis: What Part of a Sale Is Profit?

By · Updated · 3 min read

For a capital asset, a gain or loss generally compares the amount realized on a sale with the asset’s adjusted tax basis. The entire sale price is not automatically profit. Holding period, other gains and losses, and the type of account affect the tax result.

Start with what the investment cost

For a straightforward purchase, basis generally starts with the cost, including applicable purchase costs. Adjustments can change it later. Gifts, inherited assets, and other special situations have different rules, so the original owner’s purchase price is not always the answer.

This guide uses a simplified stock sale in a taxable account. Sales inside an IRA or another tax-advantaged account follow a different framework. Identify the account type before applying the example to your own records.

Sources: IRS: Topic 409 — Capital gains and losses

Subtract basis from the sale amount after selling costs

Suppose you buy 100 shares at $20 and pay a $10 purchase commission. The basis is $2,010. Later, you sell all 100 for $2,600 and pay $20 in selling costs, leaving $2,580 realized from the sale.

The gain is $570: $2,580 minus $2,010. The $2,580 received is mostly recovery of the original investment. This arithmetic excludes dividends and any other basis adjustments, and it does not calculate the tax rate.

Subtract basis from the sale amount after selling costs: comparison
Illustrative transactionAmount
Purchase price plus commission$2,010 basis
Gross sale proceeds$2,600
Selling costs−$20
Amount realized$2,580
Gain after subtracting basis$570

Check the dates before assuming a rate

A capital asset held for more than one year generally produces a long-term gain or loss; one year or less generally produces a short-term result. Exceptions apply. Net short-term gains generally receive ordinary-income tax treatment, while many net long-term gains have a different rate structure.

A gain does not have one universal tax percentage. The asset, taxable income, filing status, other transactions, and applicable taxes can change the result. Likewise, a loss is not an automatic dollar-for-dollar refund; deduction limits and special rules may apply.

Sources: IRS: Topic 409 — Capital gains and losses

Include reinvested dividends and purchase lots

Reinvested dividends can purchase additional shares with their own basis and acquisition dates. In a taxable account, reinvesting a dividend generally does not remove its income-reporting requirement. Leaving those new purchases out of the records can distort the later gain calculation.

If you bought shares on several dates, identify which shares were sold under the applicable basis method. Review the broker’s tax form against your records, especially after transfers. Resolve missing or inconsistent basis before assuming that a blank figure means the investment cost nothing.

  1. Confirm the account and asset type.
  2. Gather purchase, reinvestment, and sale records.
  3. Check adjusted basis and holding period.
  4. Use the applicable tax-year instructions to report the transaction.

Sources: IRS: Basis of shares purchased through dividend reinvestment · IRS: Publication 550 — Investment income and expenses

Terms in this guide

Sources and further reading

Examples are illustrative and focus on U.S. personal finance. This guide is educational, not individual financial, investment, tax, or legal advice. Read our editorial approach or report a correction.

Browse all money guides