FIFO Multi-Lot Sell Settlement Calculator
Allocate one sell across multiple buy lots first-in-first-out to settle realized P&L and the remaining position, with the average-cost method for comparison.
Results
Fill in the inputs and click Calculate.
- FIFO Realized P&L
- –
- Avg-Cost Realized P&L
- –
- Difference
- –
- Remaining Qty
- –
- Remaining Avg Cost (FIFO)
- –
- Remaining Avg Cost (Avg)
- –
Risk disclaimer
Results follow the cost convention and fee treatment you choose; the page gives no tax advice.
How do FIFO and average-cost differ?
FIFO assumes the earliest lots are sold first, so realized P&L depends on the cost of the lots consumed.
Average cost blends all lot costs into one mean; results differ when lot costs differ.
This is bookkeeping math only — no tax-filing methodology is implied.
How to use
- Enter buy lots from earliest to latest (cost × quantity, up to five).
- Enter the sell quantity and sell price.
- The sell quantity cannot exceed total holdings.
- Click Calculate for both realized P&L figures and remaining average costs.
Formula
- FIFO: consume lots oldest-first and compute realized P&L from consumed lot costs
- Average: realized = (sell price − all-lots average) × sell quantity
- Remaining average = remaining cost ÷ remaining quantity
Example
Lots 100×2, 90×3, 80×5; sell 3 at 120 → FIFO realized = (2×120+1×120) − (2×100+1×90) = 70.
With an average of 87, average-cost realized = 99; the two differ by −29, remaining FIFO average ≈ 82.86 vs 87.
FAQ
Fees included?
No. Fold fees into lot costs or the net sell price if you want them reflected.
Selling more than held?
Not settleable — the page rejects it. Keep sell quantity ≤ the sum of all lot quantities.