Calculate average entry from quantities, not from the number of fills
An average entry price should reflect how much was executed at each price.
Weight each fill by executed quantity
An average entry price should reflect how much was executed at each price. For compatible fills in the same instrument and direction, divide total executed notional by total quantity. A plain average of fill prices treats a tiny fill like a large one and can misstate the economic entry. Keep contract multipliers and quote units consistent.
Ten units at 100 and ninety units at 110 produce a weighted entry of 109. Marker areas reflect quantities. The unweighted mean 105 gives the small fill too much influence on cost.
Open full-size diagram ↗Compare weighted and unweighted answers
Suppose 10 units fill at 100 and 90 units at 110. Total quantity is 100 and notional is 10 × 100 + 90 × 110 = 10,900. The weighted entry is 109. The unweighted mean of the two prices is 105, which describes the average of two observations rather than the average price paid per unit.
Worked example: Correct weighted entry: 109; Unweighted fill-price mean: 105; Hypothetical exit price: 112. Invented values; units follow the row labels and article.
Open full-size diagram ↗Reconcile against a hypothetical exit
If all 100 units are later sold at 112, gross outcome is 100 × (112 - 109) = 300 under this simple unit model. Using 105 would incorrectly produce 700. These figures exclude fees, financing and currency conversion. A leveraged or derivative contract may require additional multipliers; do not assume one price unit always equals one cash unit.
Calculation checklist: Fills: 10 @ 100; 90 @ 110; Total notional / quantity: 10,900 / 100; Gross outcome at 112: 300 before costs. Preserve these definitions when reproducing the example.
Open full-size diagram ↗Separate execution price from cost basis
Some records include allocated fees in a cost basis, while an average execution price excludes them. Preserve both labels when needed instead of quietly adding a fee to the price. If quantities cross from long to short, split the closing and opening portions before applying a position-average rule. A simple weighted average alone does not define a complete inventory-accounting system.
Sources and conventions
Examples are hypothetical. Worked examples state their formulas and assumptions in the article; our methodology explains the related calculators. Broker contract specifications determine actual lot, margin and execution conditions. These sources document definitions and data; a source link does not imply endorsement of SanForex or a trading service.
These materials are prepared with AI assistance and checked against worked examples and deterministic calculation tests where applicable. They are not an expert suitability assessment or investment advice.
Open trading journal tool ↗