How cost basis changes the result
FIFO uses the earliest available units first. Moving average allocates the current pooled cost in proportion to the units sold. A buy fee adds to modeled cost. A sell fee reduces modeled proceeds.
With the example transactions, FIFO allocates 41.50 of cost to the three units sold. Proceeds after the sell fee are 88, giving a realized gain of 46.50 and a remaining basis of 20.50.
Tax assumptions
The optional reserve multiplies positive modeled realized gain by your rate. Tax treatment and permitted cost basis methods depend on jurisdiction. This tool excludes holding periods, transfers, income events, tax offsets, exchange-rate rules and reporting obligations. Use one asset and one quote currency. For example, UK HMRC examples show same-day and 30-day matching rules this model does not apply.