ALLMARKETS / THE TOOL DESK

YOUR HOLDING / FREE TOOL

Average Purchase Price Calculator

Combine your purchases and buying fees. Then see how many additional units and how much cash would be needed to reach a lower average.

One asset · Up to 100 purchases · Fractional or whole units · No account needed

1. Enter your purchases

All purchases must use the same asset, unit definition and currency. Changing this label does not convert any value.

Purchase 1

Enter a cash fee, not a percentage. If you paid 1% on a 500 purchase, enter a fee of 5. Enter units actually received; if the broker deducted its fee in units, avoid counting that fee twice.

YOUR RESULT

Average cost per unit, including fees

Loading calculator…

Enter your purchases and calculate.

Average acquisition cost only. Selling fees, prior sales, tax cost-basis rules and market prices are not included.

2. Optional: reach a lower average

Use your purchase list above and a hypothetical new purchase price. This solves for the extra units required; it does not recommend buying more.

How the average is calculated

For each purchase: total cost = units × buy price + cash buying fee. Add the costs and divide by total units. The fee-free weighted price is shown separately. This is a weighted average: buying 1 unit at 100 and 9 at 50 produces an average of 55 before fees, not 75.

Worked example

Buy 10 units at 100 with a cash fee of 1, then 5 units at 80 with a fee of 1. You hold 15 units, spent 1,402, and have an all-in average of 93.4666667. To reach an average of 80 by buying at 60 with a fixed fee of 1 and no percentage fee, the fractional model requires 10.15 more units and 610 in extra cash. If only whole units can be bought, 11 units cost 661 and bring the average to about 79.34615.

How the target planner works

Let C be your existing cost, Q your units, T the target average, P the new price, r the new percentage fee as a fraction, and F the fixed fee. Additional units = (C + F − T × Q) ÷ [T − P × (1 + r)]. The target must be below the existing all-in average and strictly above the effective new price P × (1 + r). Otherwise no positive finite purchase can meet that lower target. Whole-unit mode rounds the quantity upward and recalculates the achieved average.

What this does not model

Use purchases that make up your current holding. This calculator does not reconstruct holdings after sales, select FIFO or specific tax lots, adjust stock splits, include dividends, apply foreign-exchange conversion or estimate sale proceeds. Buying fees must be expressed in the same currency as prices. Very small nonzero values may use scientific notation: 1e-12 means 0.000000000001. The target equation and whole-unit boundary decisions use exact decimal fractions of the entered numeric values. Displayed totals and averages use floating-point arithmetic; shown values are rounded, while CSV includes unrounded model values. Whole-unit solutions above the exact integer range are rejected.

Related tools

Methodology updated 19 October 2026. Inputs remain in this page and are not submitted by this tool. No investment or tax advice.