Capital Gains and Cost Basis: What Part of a Sale Is Profit?
By Beacon · 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.
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.
| Illustrative transaction | Amount |
|---|---|
| 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.
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.
- Confirm the account and asset type.
- Gather purchase, reinvestment, and sale records.
- Check adjusted basis and holding period.
- 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
- IRS: Topic 409 — Capital gains and losses
- IRS: Basis of shares purchased through dividend reinvestment
- IRS: Publication 550 — Investment income and expenses
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.
Keep learning
Taxes · 3 min read
Estimated Taxes for Freelancers: Build a Payment Routine
Understand why freelance income can require tax payments during the year. Separate a tax reserve from an actual payment and check the IRS calculation rules.
Read the guideInvesting · 3 min read
Dollar-Cost Averaging: What Regular Investing Can and Cannot Do
Follow equal-dollar purchases at changing prices. Understand average cost, investment risk, and the difference between investing paychecks and delaying a lump sum.
Read the guideInvesting · 3 min read
Why Bond Prices Fall When Interest Rates Rise
Separate a bond’s coupon from its market price. Use a one-year example to understand interest-rate risk, selling before maturity, and bond-fund differences.
Read the guide