Overview

Calculating capital gains accurately is about three things: establishing the correct cost basis, determining proceeds and holding period, and reporting precisely on Form 8949 so totals flow to Schedule D. Brokers usually supply Form 1099‑B, but you must verify basis, apply adjustments, and code any exceptions before filing (IRS: About Form 8949, About Schedule D).

Step‑by‑step calculation

  1. Determine cost basis
  • Start with purchase price plus acquisition costs (broker fees, transaction costs). Include capital improvements for real estate. Adjust basis for stock splits, return of capital, or wash‑sale disallowed losses (IRS Pub. 550).
  1. Determine proceeds
  • Use gross proceeds reported by your broker minus selling costs (commissions, fees). Confirm the 1099‑B amounts match your records.
  1. Establish holding period
  • Short‑term: held one year or less; taxed as ordinary income. Long‑term: held more than one year; eligible for preferential long‑term rates (generally 0%, 15%, or 20% depending on taxable income, plus possible 3.8% NIIT for high earners).
  1. Compute gain or loss
  • Gain/Loss = Proceeds – Adjusted Cost Basis. If negative, it’s a capital loss.
  1. Report each transaction on Form 8949
  • Short‑term sales go in Part I; long‑term sales in Part II.
  • Use the correct box/category (A/B/C) to indicate whether the transaction’s basis was reported to the IRS on Form 1099‑B.
  • If you need to adjust basis (for wash sales, disallowed loss, or corrections), enter the adjustment amount and the code in the adjustment column per Form 8949 instructions (IRS: About Form 8949).
  1. Transfer totals to Schedule D
  • Aggregate the gains and losses from Form 8949 onto Schedule D. Schedule D computes net short‑ and long‑term totals, applies capital loss limits, and carries remaining losses forward.

Worked example

  • Bought 100 shares at $10.00 ($1,000 basis) and paid a $10 commission.
  • Sold 100 shares later for $15.00 ($1,500 proceeds) and paid a $10 commission.
  • Adjusted basis = $1,000 + $10 = $1,010. Net proceeds = $1,500 − $10 = $1,490.
  • Gain = $1,490 − $1,010 = $480. Report the sale on Form 8949 (short‑ or long‑term as appropriate), then summarize on Schedule D.

Special situations to watch

  • Broker basis reporting: If the broker reported basis to the IRS, you’ll typically use box A (short‑term) or box D (long‑term). If not, use box B or E and report the basis you show (IRS: About Form 8949).
  • Wash sales: Disallowed losses from a wash sale increase the basis of replacement shares. Track dates and amounts carefully (IRS Pub. 550).
  • Inherited property: Basis is often stepped up (or down) to fair market value at date of death—different rules apply (see internal link below).
  • Principal residence: You may exclude $250,000 ($500,000 MFJ) of gain under IRC §121 if you meet ownership and use tests—confirm rules before applying.
  • Net Investment Income Tax (NIIT): High‑income taxpayers may owe an additional 3.8% tax on net investment income.

Capital loss limits and carryovers

  • If your net capital losses exceed gains, you can deduct up to $3,000 ($1,500 MFS) against ordinary income each year; the excess carries forward indefinitely (IRS: About Schedule D).

Recordkeeping and documentation

  • Keep purchase and sale confirmations, 1099‑B, settlement statements, and receipts for improvements. Keep records at least until the statute of limitations expires for the year involved (and longer for basis documentation of property you still own).

Common mistakes and how to avoid them

  • Relying solely on the broker’s 1099‑B without reconciling basis and wash‑sale adjustments.
  • Forgetting to report small or infrequent sales—every reportable sale must appear on Form 8949 or Schedule D.
  • Misclassifying holding periods; check acquisition and sale trade dates, not settlement dates in some cases.

Practical tips

  • Use specific‑identification for tax lots when selling part of a holding to control realized gains; see our guide on optimizing tax lots for details.
  • Reconcile your Form 1099‑B to your own spreadsheet before preparing Form 8949; many tax software packages import the broker file but won’t fix basis errors for you.
  • For inherited property, consult the guidance on stepped‑up basis and special rules before assuming no gain.

Internal resources

Authoritative sources and further reading

Professional disclaimer

This article is educational and not personalized tax advice. For complex transactions, large portfolios, or transactions involving trusts, estates, or businesses, consult a qualified tax professional or CPA who can apply the rules to your situation.