Why Average Cost Matters
Your cost basis determines your actual P&L on a position. If you bought 100 shares at 200 LKR and later added 100 more at 180 LKR, your average cost is 190 LKR. Using 200 LKR as your cost basis would overstate your loss when prices are between 180 and 200. Accurate cost tracking is essential for correct P&L measurement.
Using Transactions for Auto-Calculation
The cleanest way to manage multi-buy positions is through the Portfolio Transactions log (Pro and Premium). Log each individual buy transaction with its exact price and quantity. Investography calculates the weighted average cost across all buy transactions automatically and updates the holding record. No manual averaging required.
Manual Update for Holdings
If you are on Free or Starter without transaction logging, manually calculate your weighted average cost and update the holding record. The formula is: (shares from buy 1 x price 1) + (shares from buy 2 x price 2) divided by total shares. Update the average cost field in the portfolio holding after each additional purchase.
Recalculate and update your average cost the same day you add to a position. Letting multiple buys accumulate without updating creates confusion about your true breakeven point and distorts your P&L display.
Partial Sells and Cost Basis
When you sell a portion of a holding, your average cost basis for the remaining shares does not change. Only the quantity reduces. Log the sell transaction in the Transactions feature to keep your record complete. The P&L on the sold portion is calculated as the difference between your average cost and the sell price, applied to the sold quantity.