The short answer

Your cost basis is generally what you paid for an investment, adjusted for certain events. When you sell, your gain or loss is the sale proceeds minus your basis. Your broker reports the sale on Form 1099-B and, for covered securities, also reports your basis to the IRS. But the basis on the form is not always complete or correct — and you are responsible for reporting the right amount on Form 8949 and Schedule D.

Covered vs. noncovered securities

Type of securityCovered (basis reported to the IRS) if acquired for cash in an account
Stock (other than stock eligible for average basis)After 2010
Mutual fund and other stock eligible for the average basis methodAfter 2011
Certain debt instruments and optionsAfter 2013 (and more complex debt instruments after 2015)
Securities futures contractsEntered into after 2013
Securities transferred in from another brokerCovered if the transfer statement reports them as covered

Shares bought before those dates, or transferred in without covered-security information, are generally noncovered: the broker may leave basis blank or report it to you without reporting it to the IRS. Digital assets are reported on Form 1099-DA, not Form 1099-B — see Form 1099-DA.

Adjusted basis: what changes it

  • Commissions and fees paid to buy generally add to basis (and the proceeds are reduced by selling commissions).
  • Reinvested dividends buy new shares with their own basis — and you already reported those dividends as income.
  • Stock compensation: income you reported as wages for RSUs, ESPPs, or options is part of your basis, but for awards granted after 2013 it is not included in the basis on Form 1099-B.
  • Wash sales: a disallowed loss is added to the basis of the replacement shares.
  • Stock splits and stock dividends spread your existing basis over more shares.

Gifted and inherited shares

How you got the sharesBasisHolding period
Gift, when the value at the gift was at least the donor's basisDonor's adjusted basis (increased by some or all gift tax paid, depending on the date of the gift)Includes the donor's holding period
Gift, when the value at the gift was less than the donor's basisDonor's basis for figuring a gain; value at the gift for figuring a lossDepends on which basis applies
InheritanceGenerally the value at the date of death (or alternate valuation date)Generally long-term regardless of how long you held the shares

Examples (illustrative)

Gift with a built-in loss: using the rule in Publication 551, Kevin's aunt gives him shares with an adjusted basis of $10,000 when they are worth $8,000. If he sells them for $12,000, he has a $2,000 gain (from the $10,000 basis). If he sells for $7,000, he has a $1,000 loss (from the $8,000 value). If he sells for $9,000, he has neither gain nor loss.

Inheritance: Jenny's father bought shares for $20,000. They were worth $50,000 on the date he died. Her basis is generally $50,000. If she sells them three months later for $52,000, she has a $2,000 long-term gain, and enters "INHERITED" in column (b) of Form 8949.

Basis reported to the IRS, but wrong: David sells shares for $6,000. His Form 1099-B shows a basis of $1,000 reported to the IRS, but his correct basis is $4,000 because $3,000 of compensation income was not included. He reports it with box A or D checked, enters $1,000 in column (e), code B in column (f), and an adjustment of ($3,000) in column (g), for a gain of $2,000.

Form 8949 and Schedule D

Form 8949 boxUse for
A (short-term) / D (long-term)Form 1099-B shows basis was reported to the IRS
B (short-term) / E (long-term)Form 1099-B shows basis was not reported to the IRS
C (short-term) / F (long-term)Not reported on Form 1099-B (and not a digital asset)
G–LDigital asset transactions (new for 2025)
  • Code B — the basis on the form is incorrect. With box A or D, enter the basis shown on the form and correct it in column (g) using the Worksheet for Basis Adjustments; with box B or E, enter the correct basis in column (e).
  • Code W — a wash sale loss is not deductible. Enter the disallowed loss as a positive amount in column (g). If the wash sale amount in box 1g of Form 1099-B is wrong, correct it.
  • Exception 1 — if basis was reported to the IRS and no adjustment is needed, you can report totals directly on Schedule D, line 1a or 8a, instead of listing each sale.

Common broker reporting problems

  • Zero or low basis for equity compensation (RSUs, ESPPs, options).
  • Missing basis for transferred-in or older shares (noncovered securities).
  • Wash sales across different accounts or brokers that one broker cannot see — you still apply the wash sale rules.
  • Inherited shares shown with the decedent's original basis instead of the date-of-death value.
  • Short-term vs. long-term errors for gifted or inherited shares.
ℹ️ The broker's form is a starting point

The IRS matches Form 1099-B to your return, so report the proceeds shown, but correct the basis when it is wrong and keep records that support your correction. State tax treatment is not covered.