What Form 8949 and Schedule D do
Form 8949 lists each individual sale — what you sold, when you bought and sold it, the proceeds, the cost basis, and any adjustment. Schedule D summarizes the totals from Form 8949 into short-term and long-term gains and carries the result to your 1040. In practice, tax software fills both from your 1099-B, but you must check the cost basis before you file.
The columns that matter
For each sale Form 8949 has: (a) description, (b) date acquired, (c) date sold, (d) proceeds, (e) cost basis, (f) adjustment code, (g) amount of adjustment, and (h) gain or loss. Columns (f) and (g) are the fix-it columns. Most of the time (d) and (e) come straight from the 1099-B — but when the basis in (e) is wrong, you use (f) and (g) to correct it.
How to fix a wrong or $0 cost basis
This is the single most valuable use of Form 8949. When your 1099-B shows a $0 or too-low basis on RSU, ESPP, or NSO shares, enter the broker figures in (d) and (e), put code B in column (f) ("basis was reported to the IRS but is incorrect"), and in column (g) enter a negative adjustment equal to the missing basis. Column (h) then reflects only your true gain. This is how you avoid being taxed twice on compensation you already reported as income.
Short-term vs long-term boxes
Form 8949 is split into Part I (short-term, held one year or less) and Part II (long-term). Within each, sales are grouped by whether basis was reported to the IRS (box A/D), not reported (box B/E), or not on a 1099-B (box C/F). Getting a sale in the right box matters because it determines whether the gain is taxed at ordinary or long-term rates.
Common mistakes
The biggest is accepting a $0 basis and overpaying. Others: putting a sale in the wrong holding-period part, forgetting to add reinvested dividends to basis, and mis-handling wash sales (which use code W and a positive adjustment). If you already filed with a wrong basis, you can amend with Form 1040-X and a corrected 8949, generally within three years.
A quick example
RSUs vested worth $10,000 (already taxed as income) and you sell them for $11,000. The 1099-B shows proceeds $11,000, basis $0. On Form 8949 you enter those, use code B, and put −$10,000 in column (g). Column (h) shows a $1,000 gain — your real gain — instead of $11,000. That single adjustment saves the tax on $10,000.