To report stocks on taxes, you list each sale on Form 8949, carry the totals to Schedule D, and report dividends from Form 1099-DIV on your Form 1040 (adding Schedule B if your ordinary dividends and taxable interest topped $1,500). Your broker sends the numbers to the IRS too, so the figures on your return need to match what they filed, with any corrections shown as adjustments rather than silent edits.
Start With the Forms Your Broker Sends
Two documents drive everything. Form 1099-B lists every sale or exchange of securities from your taxable account, with the acquisition date, sale date, gross proceeds, and cost basis for each lot.1Internal Revenue Service. About Form 1099-B, Proceeds from Broker and Barter Exchange Transactions Form 1099-DIV breaks your dividends into ordinary dividends, qualified dividends, capital gain distributions, and foreign taxes withheld.2Internal Revenue Service. About Form 1099-DIV, Dividends and Distributions Both are usually available by mid-February.
Compare them to your own records before you file. Brokers sometimes report an incorrect cost basis, particularly for shares that came from an employee stock plan or a transfer from another firm. You don’t have to wait for a corrected form. You can enter the right numbers on Form 8949 using an adjustment code, following the form’s instructions.3Internal Revenue Service. Instructions for Form 8949 (2025) It’s still worth asking the broker to issue a corrected 1099-B so their filing lines up with yours.
Form 8949: The Line-by-Line Sale Log
Form 8949 is where each sale gets its own line: the security’s name, the date acquired, the date sold, the proceeds, and the cost basis. Proceeds minus basis gives the gain or loss.3Internal Revenue Service. Instructions for Form 8949 (2025) Part I is for short-term transactions (held one year or less). Part II is for long-term transactions (held more than a year). The split matters because short-term gains are taxed at your ordinary income rate, while long-term gains get preferential rates of 0%, 15%, or 20% depending on your taxable income.4Internal Revenue Service. Fact Sheet FS-2007-19 – Reporting Capital Gains
There is a shortcut for straightforward trades. If the broker reported the correct cost basis to the IRS and no adjustments are needed, you can skip the line-by-line listing for those transactions and enter the totals directly on Schedule D (line 1a for short-term, line 8a for long-term). Active traders lean on this.
Choosing Which Shares You Sold
If you bought the same stock at different prices over time, your basis depends on which lot is treated as sold. The default is first-in, first-out, so the IRS assumes the oldest shares went first. Specific share identification lets you tell your broker exactly which lot to sell, but the choice has to be made at or before the trade, not afterward. Mutual fund shares can also use the average cost method.
Wash Sales
Sell a stock at a loss and buy the same or substantially identical security within 30 days before or after the sale, and the wash sale rule disallows the loss. The full window is 61 days, centered on the sale date. On Form 8949 you enter adjustment code “W” and add the disallowed amount back; the loss is added to your basis in the replacement shares, so it’s deferred rather than lost.5Internal Revenue Service. Case Study 1 – Wash Sales – IRS Courseware
Worthless Securities
If a stock becomes completely worthless, the IRS treats the sale as occurring on the last day of the tax year it became worthless, no matter when trading actually stopped. The loss is long-term if you owned the shares more than a year through that deemed sale date. Report it on Form 8949 with zero proceeds and your original cost basis.
Digital Assets
Starting in 2026, brokers must report cost basis for certain digital asset transactions, and Form 1099-DA exists for cryptocurrency and other digital asset sales.6Internal Revenue Service. Digital Assets Digital assets held as capital assets go on Form 8949 the same way stocks do. Form 1040 also asks a digital asset question you have to answer whether or not you had any transactions.
Schedule D: Netting It Out
Schedule D is where Form 8949 totals come together. Part I gathers short-term results, Part II gathers long-term, and Part III does the netting: short-term against short-term, long-term against long-term, then the two nets against each other.7Internal Revenue Service. Topic No. 409, Capital Gains and Losses
If total capital losses exceed total capital gains, you can deduct the lesser of your net loss or $3,000 against ordinary income ($1,500 if married filing separately). Any remaining loss carries forward to future years indefinitely, so it isn’t lost.7Internal Revenue Service. Topic No. 409, Capital Gains and Losses The final numbers from Schedule D flow onto Form 1040.
Reporting Your Dividends
Dividends from Form 1099-DIV go on your Form 1040. Ordinary dividends are taxed at your regular rate. Qualified dividends get the same preferential rates as long-term capital gains, but only if you held the stock at least 61 days during the 121-day period starting 60 days before the ex-dividend date.8Internal Revenue Service. Publication 550 (2025), Investment Income and Expenses The 1099-DIV already tells you which category each dividend falls into, so you don’t need to calculate the holding period yourself unless your records disagree.
Total ordinary dividends (or taxable interest) above $1,500 for the year also require Schedule B, which lists each payer and the amount.9Internal Revenue Service. About Schedule B (Form 1040), Interest and Ordinary Dividends
Employee Stock: RSUs and ESPPs
This is where overpayment is common. Compensation from Restricted Stock Units (at vesting) and from Employee Stock Purchase Plan disqualifying dispositions already appears on your W-2 as wages. But your 1099-B may show a cost basis of $0 or a very low figure, because brokers aren’t required to include that compensation income in reported basis. If you use the 1099-B number as-is, you pay tax on the same income twice.
For RSUs, your broker typically issues a supplemental information document separate from the 1099-B that shows an adjusted basis including the amount already taxed on your W-2. Use that adjusted basis on Form 8949. Tax software doesn’t always pick this up automatically, so you may have to enter the adjustment yourself.
For an ESPP disqualifying disposition (selling within two years of the grant date or one year of the purchase date), the purchase discount counts as ordinary income on your W-2. Your basis on Form 8949 is the purchase price plus that ordinary income amount. The remaining gain or loss is short-term or long-term based on how long you held the shares after purchase.
Inherited and Gifted Stock
How you acquired the shares changes the basis rules.
Inherited
Inherited stock generally takes a cost basis equal to the fair market value on the date of death, not what the decedent originally paid.10Internal Revenue Service. Publication 551, Basis of Assets That stepped-up basis can erase decades of unrealized gain. Inherited stock is treated as long-term no matter how briefly you actually hold it.
One exception: if you gave appreciated stock to someone who died within a year and you received it back, the basis is the decedent’s adjusted basis rather than the stepped-up fair market value.10Internal Revenue Service. Publication 551, Basis of Assets
Gifted
Stock received as a gift while the donor is living works differently. If the fair market value at the time of the gift was at or above the donor’s basis, you take over the donor’s original basis and their holding period. If the fair market value at the time of the gift was less than the donor’s basis, you have a split basis: use the donor’s basis to figure a gain and the gift-date fair market value to figure a loss. Sell at a price between those two figures and there’s no gain and no loss.11Internal Revenue Service. Property (Basis, Sale of Home, Etc.)
Trades Inside a Retirement Account Don’t Get Reported
Buys and sells inside an IRA, 401(k), or other tax-advantaged retirement account do not go on Form 8949 or Schedule D. Those accounts are tax-deferred (or tax-free for Roth), so individual transactions aren’t taxed. Reporting happens only when money comes out as a distribution, on Form 1099-R.12Internal Revenue Service. Reporting IRA and Retirement Plan Transactions
Foreign Taxes on Dividends
If you hold international stocks or global funds, Box 7 of your 1099-DIV may show foreign tax withheld from your dividends. You can generally claim a credit so you’re not taxed twice on the same income. If your foreign tax is $300 or less ($600 or less for married filing jointly), you can claim the credit directly on Schedule 3 of Form 1040 with no extra form. Above those amounts, you file Form 1116.13Internal Revenue Service. Instructions for Form 1116 (2025)
The Extra 3.8% at Higher Incomes
Higher earners owe an extra 3.8% Net Investment Income Tax on top of the regular tax on capital gains, dividends, interest, annuities, royalties, and rents. It applies to the lesser of your net investment income or the amount by which your modified adjusted gross income exceeds:14Internal Revenue Service. Topic No. 559, Net Investment Income Tax
- $200,000 for single filers and heads of household
- $250,000 for married filing jointly or a qualifying surviving spouse
- $125,000 for married filing separately
These thresholds don’t adjust for inflation. Wages and distributions from most retirement accounts don’t count as net investment income. Calculate the tax on Form 8960 and carry it to Form 1040.15Internal Revenue Service. 2025 Instructions for Form 8960 – Net Investment Income Tax