Portfolio Value/Total Gain
The value reported for total gain/loss is a money-weighted return (MWR) which captures the return on the average invested capital. It is a measure of the net enrichment, taking cash flows into account. It also takes into consideration the dividends paid. It is based upon a revised version of Modified Dietz.
To calculate the total gain/loss percentage in your portfolio we calculate the cost basis for each stock in your portfolio first: Cost basis: share price * number of shares
Next, we look at the current stock value: number of shares * current stock price
To calculate your gains (or losses), subtract the cost basis from your current stock value. For example if your cost basis was £12,000 and your current stock value was £13,000 then your profit or gains will be £1000. In the same way, if your current stock value is lower than your cost basis your loss will be £1000.