Stock tax-lot matching · FIFO · Form 8949

Form 8949 Generator & FIFO Cost Basis Calculator

Import stock trades, match sales to purchase lots using FIFO, separate short- and long-term gains, map ordinary stock transactions to Form 8949 boxes A–F, and keep a lot-level audit trail.

Designed conservatively: the tool does not pretend to solve every wash sale, transfer, option, employee-stock, crypto, or corporate-action edge case. Unsupported facts are surfaced for review.

Quick guide

Four checks before you run the Form 8949 engine.

01

Bring complete lot history

For FIFO, include every purchase needed to support the shares sold. For loss sales, include the full 30-day window before and after the sale when wash-sale testing is required.

02

Use reporting_status on SELL rows

reporting_status describes the disposition's 1099-B treatment. BUY rows do not need it; repeated BUY-row values are ignored.

03

Pair FX rate with currency

If you provide fx_rate_to_usd, also provide a 3-letter currency such as EUR, CAD, or JPY. The tool will stop instead of silently assuming USD.

04

Confirm the wash-sale scope

The automatic engine covers supported uploaded accounts and explicit wash groups. Spouse purchases, controlled-corporation purchases, and legal judgments about different but substantially identical securities require manual review.

Normalized CSV minimum: trade_id, date, account, symbol, action, quantity, price. Use reporting_status only to classify SELL rows. For foreign-currency trades, include both currency and fx_rate_to_usd.
Free calculator

Turn transaction history into Form 8949-ready rows

Upload a brokerage export and map its columns online. Unknown foreign-broker formats do not need to match a fixed template. For non-USD trades, provide or map the USD conversion rate used for each transaction. Do not upload names, SSNs, addresses or full account numbers.

Ruleset: ordinary stocks / ETFs
01

Choose the tax year

For a filing-ready result, confirm both the asset scope and lot method. For loss sales, coverage must also extend at least 30 days before and after every sale, and the taxpayer-level wash-sale scope must be complete.

02

Map almost any brokerage export

CSV, TSV, TXT and XLSX are accepted. First map the source columns to tax-lot fields; then map the broker's transaction type or description values to BUY / SELL / IGNORE / REVIEW. Suggestions are preselected where possible, but calculation does not depend on a broker-specific template.

05

Opening lots & broker transfers

If the first imported year starts after you originally bought the shares, enter the open tax lots that existed immediately before the imported history. Broker-to-broker transfers are movements of those same lots—not new purchases or sales—so their acquisition dates, adjusted basis and wash-sale history must carry through.

Accuracy ruleOpening lots must use adjusted tax basis, not statement market value. If basis is estimated or incomplete, the result stays Review required.
TransfersExplicit source-lot allocation is required. The engine will not guess which lots moved between brokers.

Opening lots

One row per open tax lot. Preserve original acquisition date and any prior wash-sale holding-period adjustment.

Import an arbitrary opening-position / cost-basis file
Reconstruct opening lots from older transaction history

Use the normalized transaction history already loaded below. For a January 1 baseline, include enough prior history to identify every open lot and, for December loss sales, acquisitions through the following 30 days. Reconcile the reconstructed quantities to the broker's prior December 31 holdings before accepting the result.

Required: lot_id, account, symbol, acquired, quantity, adjusted_basis_usd, basis_provenance. For a foreign-currency basis statement, map the original basis currency and the lot-specific FX rate to USD; the tool will not substitute a year-end rate.

Broker transfers

One or more rows can allocate a transfer across exact source lots/segments. Basis and holding period move; no sale is created.

For a partial transfer, map transfer_id, date, from_account, to_account, symbol, quantity and source_lot_id. For a confirmed full-account ACATS move, set transfer_all=true and the engine will move every open lot exactly as it exists at that point. Use source_segment_id for partial transfers of wash-adjusted split lots.

06

Optional: edit or paste normalized transaction data

You can also paste normalized CSV directly. Minimum columns: trade_id, date, account, symbol, action, quantity, price. For foreign-currency rows, provide both currency and fx_rate_to_usd before calculating. An FX rate without a currency code is rejected rather than silently treated as USD.

reporting_status: SELL rows only — basis_reported / basis_not_reported / no_1099_b / blank workpaper. Values repeated on BUY rows are ignored. account_type: taxable / ira / roth_ira / other A/B/D/E rows require broker_reported_proceeds_usd. Optional sequence resolves same-day order. Blank reporting_status keeps FIFO/wash results provisional until tax-statement reconciliation.

Server calculation is stateless. Transaction payloads are not intended for storage.

Foreign brokerage accounts

No 1099-B does not mean no Form 8949.

U.S. taxpayers may still need to report stock sales from foreign brokers. This workflow is built for trade history that does not arrive in a U.S. 1099-B format.

01

Import trade history

Use a normalized CSV from a foreign or U.S. broker. The universal mapper accepts CSV/TSV/TXT/XLSX exports and lets you map unknown broker columns and transaction descriptions before the tax engine runs.

02

Convert to USD

For non-USD transactions, provide both the 3-letter transaction currency and the USD conversion rate used for that transaction. A populated FX rate with no currency code is rejected so it cannot be silently treated as USD.

03

Match FIFO lots

Sales consume the oldest available shares in the same account and symbol when FIFO applies.

04

Build 8949 output

Transactions without Form 1099-B are mapped to box C for short-term or F for long-term ordinary stock transactions.

For EAs and CPAs

Audit the lot match instead of trusting a black-box gain number.

Professional output is designed around source-row traceability, broker-basis reconciliation, holding-period classification and explicit review stops.

Broker basis mismatch

For basis-reported transactions, the engine preserves broker basis in Form 8949 column (e) and uses code B / column (g) when a correction is needed.

Mixed holding periods

A single sale spanning both short- and long-term FIFO lots is split for noncovered/no-1099 output. Basis-reported aggregate rows are stopped for review if a single broker basis cannot be safely allocated across terms.

Multiple accounts

FIFO inventory stays account-specific, while the wash-sale engine can match replacement shares across uploaded taxable, IRA and Roth IRA accounts.

Unsupported facts

Explicit taxable-to-taxable broker transfers are supported when source lots are identified. Short sales, options, average-basis mutual funds, corporate actions, crypto, automatic employee-stock basis rules, and spouse / controlled-corporation wash-sale relationships remain review items rather than being silently guessed.

Common questions

FIFO cost basis, Form 8949 and brokerage CSV questions people actually search for

How do I calculate FIFO cost basis for stocks?

Keep each purchase lot separately. When a sale occurs and no adequate specific-share identification applies, match the sale against the oldest available shares first. Purchase fees increase basis; selling fees reduce net proceeds when they are not already reflected elsewhere.

How do I report stock sales when my foreign broker did not issue a 1099-B?

Form 8949 still reports many capital-asset dispositions without a 1099-B. For ordinary stocks, short-term transactions generally fall in box C and long-term transactions in box F when no broker statement applies.

Why is my broker's basis different from my own calculation?

Covered-security basis shown to the IRS must generally remain in Form 8949 column (e). If it is incorrect, Form 8949 uses adjustment codes and column (g) rather than simply replacing the reported amount.

Can two brokerage accounts create a wash sale?

Potentially. A broker's 1099-B may not capture every taxpayer-level replacement purchase. The tool screens same-symbol buys across the uploaded accounts but does not make the final substantially-identical determination.

Can I use this for RSUs or ESPP shares?

You can use ordinary lots if you already know the correct tax basis, but this tool does not automatically derive compensation basis from W-2, Form 3922, vesting data or plan documents.

Does this support crypto?

No. Digital assets have separate 2025 Form 8949 boxes and modern account/wallet identification rules. This version intentionally focuses on ordinary stocks and ETFs.

Can I download an IRS-compatible Form 8949 statement PDF?

Yes. For 2025 ordinary stock transactions, the PDF export can produce an Exception 2 attached statement with columns (a) through (h), 48 transactions per detail page, broker/account summary rows using code M, and Schedule D destination guidance. Official-form merging is enabled only after the current IRS template is installed and visually verified on the deployment.

Primary authorities

Built around IRS Form 8949 instructions and Publication 550.

Rules reviewed October 6, 2026. Current filing source set uses 2025 Form 8949 / Schedule D guidance.

Need a professional review?

Complex wash sales, missing basis, employee stock and foreign brokerage history can require more than FIFO.

US Tax Pilot handles specialist international and investment-reporting projects where the source data needs reconstruction before the return can be filed.

Request an assessment
IRC §7216 & Privacy Compliance

Data Privacy & Zero-Storage Transparency Notice

We understand the sensitive nature of U.S. tax and securities transaction data. This tool adheres strictly to data minimization and stateless computation principles:

🛡️

What We Never Record (Zero-Storage Guarantee)

  • No Personal Identifying Information (No PII): We never ask for or store your name, SSN, ITIN, address, phone number, or email.
  • No Trade Data Retention: Your uploaded CSV/Excel brokerage files are processed strictly in-memory and discarded immediately upon response. No trade transactions are ever written to server disk or database.
  • No Brokerage Account Linking: Completely stateless. No login required, and no credentials or API connections to financial institutions.
📊

What We Record (Security & Operational Metrics Only)

  • Abuse Prevention & Rate Limiting: Short-window IP rate limiting to prevent automated bots from exhausting PDF rendering resources.
  • Anonymous Reliability Metrics: Anonymized latency, HTTP status codes, and scope-gate trigger counts to maintain server stability during peak filing season.
  • Public User Reviews (Optional): If you choose to submit feedback below, your review is published only after manual anti-spam moderation.

Related Free Tax Tools & Specialist Services

Explore additional zero-storage utilities or connect with licensed tax professionals for international filing support.

📊 FTC Carryover Tracker (Form 1116) → 🛠️ All Free Tax Tools Hub → 📑 PFIC Form 8621 Support → 📋 Complete Form 1040 Preparation →