Independent guide · Crypto

Cost-basis arithmetic: FIFO and an average-cost illustration

Two worked examples for Cost-Basis / Gain Calculator: inputs, calculations, rounding and the limits of the model.

Cost-basis arithmetic: FIFO and an average-cost illustration

Why this matters

This illustration allocates recorded acquisition costs to an entered disposal. It compares FIFO with a simple average-cost pool. The method selector changes the arithmetic only; it does not determine which treatment a jurisdiction permits or requires.

Before entering the numbers

This illustration allocates recorded acquisition costs to an entered disposal. It compares FIFO with a simple average-cost pool. The method selector changes the arithmetic only; it does not determine which treatment a jurisdiction permits or requires.

Open the calculator: Cost-Basis / Gain Calculator. All figures below are hypothetical. CU denotes a consistent currency unit, not a named currency. Field and result names match the English calculator interface.

FIFO: allocated cost 3,250 CU

Enter two lots: one unit costing 2,000 CU in total and two units costing 5,000 CU in total. Dispose of 1.5 units for 4,500 CU gross with a 10 CU sale fee. FIFO consumes the first lot before half a unit from the second.

Entered fields: Lots in acquisition order: quantity, total cost including fees; one lot per line: 1, 2000; 2, 5000 (1–100 lots; quantity >0; total cost ≥0; values ≤1e12) · Illustrative allocation method: FIFO · Quantity sold: 1.5 (asset units) · Gross sale proceeds: 4500 (CU) · Sale fees: 10 (CU)

Calculated results: Allocated acquisition cost: 3,250.00 CU · Net sale proceeds: 4,490.00 CU · Illustrative realised gain / loss: 1,240.00 CU · Remaining quantity: 1.50000000 asset units · Remaining acquisition cost: 3,750.00 CU

  • FIFO cost = 2,000 + 0.5 × (5,000 / 2) = 3,250 CU
  • net proceeds = 4,500 − 10 = 4,490 CU
  • gain = 4,490 − 3,250 = 1,240 CU; remaining cost = 7,000 − 3,250

Weighted average: allocated cost 3,500 CU

Keep the same lots and sale but choose average cost. The pool contains three units costing 7,000 CU, so 1.5 units receive half the pooled cost. The proceeds stay unchanged while allocated cost and the illustrative gain change.

Entered fields: Lots in acquisition order: quantity, total cost including fees; one lot per line: 1, 2000; 2, 5000 (1–100 lots; quantity >0; total cost ≥0; values ≤1e12) · Illustrative allocation method: Weighted average · Quantity sold: 1.5 (asset units) · Gross sale proceeds: 4500 (CU) · Sale fees: 10 (CU)

Calculated results: Allocated acquisition cost: 3,500.00 CU · Net sale proceeds: 4,490.00 CU · Illustrative realised gain / loss: 990.00 CU · Remaining quantity: 1.50000000 asset units · Remaining acquisition cost: 3,500.00 CU

  • average cost = 7,000 / 3 CU per unit
  • allocated cost = 1.5 × (7,000/3) = 3,500 CU
  • gain = 4,490 − 3,500 = 990 CU; remaining cost = 3,500 CU

What the result leaves out

This is not a tax calculation. It does not handle legal lot-selection rules, reporting currencies, transfers, staking receipts, corporate actions, loss restrictions or incomplete records. Acquisition fees must already be included in the entered lot cost where appropriate.

Arithmetic uses unrounded intermediate values; displayed numbers are rounded. These examples document the model, not a provider quote or an observed transaction.

18+. Educational information only. This is not financial, investment, legal or tax advice, and it is not a guarantee of any result. Betting, gambling and crypto involve a risk of losing money. Estimates depend on your inputs; verify current provider terms and local rules.

Practical checklist

  • Ensure that only remaining unconsumed lots are included in the calculation.
  • Verify that all values are in the same currency and that acquisition fees are included once.
  • Check that the sale fee is deducted once from the gross proceeds.
  • Reconcile the quantity sold with the total available quantity to avoid over-allocation.

Sources and further reading

Fact-checked: . External sources open in a new tab.

  1. Cost-Basis / Gain CalculatorWinWinWin
  2. MethodologyWinWinWin
← More guides