Prepare realised-gains workpapers for your 1099-B and Form 8949
A script reconciles your broker's Form 1099-B with your own trade log, lot by lot, and an agent groups the rows the way Form 8949 and Schedule D are laid out, flagging every mismatch for your tax preparer to review.
How it works
- Before you start, read the current IRS Instructions for Form 8949 and write down, with your tax preparer, the decisions that apply to you: which accounts are in scope (taxable accounts only), how short-term and long-term are split, and how your preparer wants adjustments shown. Record the tax year and the date you read the instructions.
- Download the 1099-B for each taxable account, as the broker's CSV or spreadsheet export where it offers one, plus your own closed-trade log for the same year. Keep the broker's PDF as the record of what was reported.
- Run {{reconcile_script}}, a local Python script you have tested on a small sample, to match each 1099-B row with your log by date acquired, date disposed, quantity and proceeds. The script computes every total and difference; the agent must not.
- The script labels each row with the Form 8949 box the 1099-B points to: short-term or long-term, and whether the basis was reported to the IRS (covered lots) or not (noncovered lots), or no 1099-B was received at all.
- It lists every difference: basis that differs from your log, wash-sale loss disallowed amounts the broker reported, adjusted basis after corporate actions, noncovered lots with no basis shown, and rows in your log the 1099-B lacks or the other way round.
- Ask the agent to turn the script's output into a workpaper: totals per box, a mismatch list in plain language, and a notes section of open questions for your preparer. It shows you a preview; nothing is saved until you confirm.
- Save the workpaper, the script output and the assumptions note to your journal or records folder.
- Your tax preparer reviews everything and decides what is reported, and how, before anything is filed.
Copy-paste prompt
All numbers come from {{reconcile_output_csv}}, produced by my local {{reconcile_script}} from my 1099-B export {{broker_1099b_csv}} and my trade log {{trade_log_csv}} for tax year {{tax_year}}. This is not tax advice; a qualified tax professional reviews it.
1. Do not compute, estimate or change any amount. If a total or difference is missing from the script output, say so and stop.
2. Group the rows by the Form 8949 box shown in the box column (short-term or long-term; basis reported, basis not reported, or no 1099-B). Show the script's totals for proceeds, cost basis, adjustments and gain or loss per box.
3. List every row the script flagged (basis difference, wash-sale amount reported, noncovered lot with no basis, missing from the 1099-B, missing from my log) with a one-line plain-language note on what to ask my preparer.
4. Add a notes section: tax year, accounts included, the date I read the IRS instructions, and every assumption the script made.
5. Do not choose adjustment codes, do not decide how anything should be reported, and do not comment on any trade or holding.Guardrails
- Not tax advice. A qualified tax professional reviews the workpapers and decides what is filed.
- Every amount comes from the 1099-B or from your tested script, never from the model.
- The broker's 1099-B is the record of what was reported to the IRS; differences go to your preparer, not into silent edits.
- Assumptions, the tax year and the date you read the IRS instructions are listed in the workpaper.
- Shows a preview of the workpaper before anything is written to your journal or records folder; nothing is written until you confirm.
- Run the script on your own machine and remove account numbers and your taxpayer identification number before any file reaches a cloud assistant.
What can go wrong
The first pass matched on date and quantity only, and two partial exits on the same day were swapped, so both rows showed a basis difference that wasn't real. Matching on proceeds as well fixed it. The bigger surprise was that the broker's basis was right and the log was wrong: a stock split had never been entered in the journal. Wash-sale amounts on the 1099-B also cover only that one account, so a repurchase in another account never shows there; your preparer needs to know about all your accounts. Always reconcile row counts and totals to the broker's PDF before the preparer sees anything.
Why it helps
Most of the year-end work is not the tax return itself but finding out why the broker's numbers differ from yours. Doing the reconciliation in a script, row by row, turns that into a short list of specific questions for your tax preparer instead of a shoebox of statements.
How the boxes work
Form 8949 sorts each disposal by holding period (short-term or long-term) and by what the 1099-B shows: basis reported to the IRS, basis not reported, or no 1099-B at all. The IRS instructions say to report the basis shown on the 1099-B and to make any correction in the adjustment column, with a code, rather than changing the reported figure. This workflow only prepares the rows and the questions; the coding and reporting decisions are your preparer's.
Note
US tax rules and forms change every year. Treat the current IRS instructions and your tax preparer as the authority; this workflow only prepares the numbers. Not tax advice; check with a qualified tax professional.
Source and references
Original write-up by Agents for Traders, based on the IRS instructions and publication linked below.
- Instructions for Form 8949, Sales and Other Dispositions of Capital Assets · Internal Revenue Service (checked 27 Oct 2026)
- Instructions for Schedule D (Form 1040), Capital Gains and Losses · Internal Revenue Service (checked 27 Oct 2026)
- Publication 550, Investment Income and Expenses · Internal Revenue Service (checked 27 Oct 2026)
Spotted an error, or want your post removed? Email hello@agentsfortraders.com.
Educational content only. Not investment advice or a personal recommendation. No tickers, signals or trade alerts. Trading involves risk of loss.
Conteúdo exclusivamente educativo. Não constitui aconselhamento nem recomendação de investimento. Sem tickers, sinais ou alertas de negociação. Negociar envolve risco de perda.
The Daily 3
Three agent workflows for swing traders, free, on US trading days.