Karw, The formula you can use for average share cost in the spread sheet is for example SOM(I13:I55)/O55 . . . . (Net investment for 43 data lines) I= Equity cost(+ or -) for each trade O= Number of shares at the end of the run You do not need to consider the cash first and then subtract it again. . .the sum of the equity trades is already available in the spreadsheet. Of course you could ad the trading cost to that sum as I mentioned before and interest on cash could be subtracted form it as well.