Cost Basis
Cost basis is the original value of an asset for tax purposes — typically the purchase price plus commissions and acquisition costs, adjusted over time for events like splits, return-of-capital distributions, wash-sale disallowances, and inheritance step-ups.
Cost basis is the foundation of every capital-gain calculation. When a share is sold, the gain or loss is sale proceeds minus cost basis, and the holding-period classification (short-term vs long-term) flows from when the basis was first established. The complication is that cost basis is rarely the simple purchase-price story: stock splits change per-share basis but not aggregate basis, return-of-capital distributions reduce basis (without creating a taxable event until basis hits zero), wash sales add disallowed losses to the basis of the replacement lot, and inheritance triggers a step-up to fair-market-value at the date of death.
Brokers must report 'covered' securities (acquired after specific phase-in dates: 2011 for equities, 2012 for mutual funds, 2014 for less-complex bonds) on Form 1099-B with cost basis included; older 'non-covered' positions report only sale proceeds, leaving the taxpayer to establish basis. This bifurcation produces a routine real-world failure mode: a position transferred from a 1990s-era account into a modern brokerage often arrives without basis, and the taxpayer has to reconstruct it from old confirmations.
Multiple methods exist for choosing which lots to sell when only some are sold: FIFO (default), LIFO, HIFO, average cost (mutual funds), and specific lot identification. The choice has real after-tax consequences and engines that hardcode FIFO ship plans with avoidable tax bills.
G = P − (B_original + ΔB)- G
- = realized gain (or loss)
- P
- = sale proceeds (price × shares minus commissions)
- B_original
- = original purchase basis
- ΔB
- = cumulative basis adjustments (RoC distributions, wash-sale add-ons, splits)
Sale of 100 shares: P=$5,000, B_original=$3,000, ΔB=−$200 (RoC) +$100 (wash-sale add-on) = −$100. G = $5,000 − ($3,000 − $100) = $2,100.A wealth dataset that stores only aggregate position cost basis cannot drive a correct tax-aware sell engine. The engine has to see lot-level basis with acquisition dates, holding-period flags, wash-sale adjustment carrying, and (for inherited lots) the date-of-death step-up. Synthetic households should carry realistic basis-vs-market spreads — not every position at exactly cost — and a healthy mix of covered and non-covered lots so that basis-reconstruction logic gets exercised.
Common pitfalls
- Treating dividend reinvestment as a basis-neutral event — DRIP shares each have their own lot at the reinvestment-day price.
- Forgetting to adjust basis for return-of-capital distributions, especially common with REITs and MLPs.
- Carrying a wash-sale-disallowed loss as a separate field instead of adding it to the replacement lot's basis as required.
- Stepping up basis on inherited assets owned in joint-with-rights-of-survivorship form between spouses — only the deceased spouse's half steps up in non-community-property states.
Examples
Sell 100 shares of XYZ at $40 (lot acquired at $50, basis $5,000) for $4,000 — a $1,000 loss. Buy 100 replacement shares 12 days later at $42, total $4,200. The $1,000 loss is disallowed; instead, the replacement lot's basis becomes $4,200 + $1,000 = $5,200. Holding period of the original lot carries over.
Buy 100 shares of REIT at $50 (basis $5,000). Each quarterly $0.50/share dividend is reinvested at the then-current price. After 4 quarters: 4 separate lots of fractional shares, each with its own acquisition date and per-share basis. Aggregate basis = original $5,000 + reinvested dividends.