How to use this calculator
- Enter First lot bought ($)。
- Enter First lot units。
- Enter Units sold。
Leave any field blank and the calculator solves for it from the remaining values — every quantity is reversible.
The calculator then returns: Cost of sale。
What is it
FIFO Gain — Enter First lot bought, First lot units and Units sold to get Cost of sale — or leave any field blank to solve for it. Tax calculators apply rates, deductions and depreciation rules to your figures to estimate tax due or after-tax outcomes. The core question it answers is: Cost of sale. With First lot bought = 15,000 $, First lot units = 1 and Units sold = 0.5, Cost of sale is 7,500 $.
Formula
| Variable | Inputs | Unit |
|---|---|---|
lot1Amount | First lot bought | $ |
lot1Units | First lot units | |
soldUnits | Units sold | |
cost | Cost of sale | $ |
lot1Amount / lot1Units * soldUnitsThe relationship is solved in every direction, so any one unknown field can be derived.
Worked example
Using the default inputs:
- First lot bought = 15000 $
- First lot units = 1
- Units sold = 0.5
Formula used: lot1Amount / lot1Units * soldUnits
Answer:
- Cost of sale = 7,500 $
Example 1 (default inputs):Suppose First lot bought = 15,000 $, First lot units = 1, Units sold = 0.5; then giving Cost of sale = 7,500 $.
Example 2 (one input changed):If you change First lot bought to 22,500,giving Cost of sale = 11,250 $.
Additional information
Assumptions and limitations
- Tax systems are highly local and change often: allowances, brackets, social contributions and surtaxes differ by jurisdiction. These calculators return a mechanical result from your inputs — for filings, rely on your tax authority and a professional.
- Good for: getting a directionally correct order of magnitude quickly, or comparing two scenarios.
- Not good for: using it as the sole basis for a decision, or for official filings, contract pricing and legal documents — those need a full model with your actual clauses and local rules.