How to use this calculator
- Enter Total bought ($)。
- Enter Total 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 sold units。
What is it
Average Cost Basis — Enter Total bought, Total units and Units sold to get Cost of sold units — 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 sold units. With Total bought = 40,000 $, Total units = 2.5 and Units sold = 1, Cost of sold units is 16,000 $.
Formula
| Variable | Inputs | Unit |
|---|---|---|
fillAmounts | Total bought | $ |
fillUnits | Total units | |
soldUnits | Units sold | |
avgCost | Cost of sold units | $ |
fillAmounts / fillUnits * soldUnitsThe relationship is solved in every direction, so any one unknown field can be derived.
Worked example
Using the default inputs:
- Total bought = 40000 $
- Total units = 2.5
- Units sold = 1
Formula used: fillAmounts / fillUnits * soldUnits
Answer:
- Cost of sold units = 16,000 $
Example 1 (default inputs):Suppose Total bought = 40,000 $, Total units = 2.5, Units sold = 1; then giving Cost of sold units = 16,000 $.
Example 2 (one input changed):If you change Total bought to 60,000,giving Cost of sold units = 24,000 $.
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.