1. How to use GuruFocus - Tutorials
  2. What Is in the GuruFocus Premium Membership?
  3. A DIY Guide on How to Invest Using Guru Strategies
James Li
James Li
Articles (588)  | Author's Website |

New Portfolio Gain Calculation in My Portfolios Feature

We have changed how we compute portfolio gains

We are pleased to announce we have improved our My Portfolios feature by offering two different calculations for portfolio gains.


Investopedia defines the realized gain as the excess profit resulting from selling an asset at a price higher than the original purchase price. The GuruFocus My Portfolios Overview page contains two different “portfolio gain” columns: “Gain %” and “Gain.” Figure 1 shows a sample My Portfolios Overview page.

Figure 1

Figure 1 shows a hypothetical portfolio containing seven stocks: Apple Inc. (NASDAQ:AAPL), Baidu Inc. (NASDAQ:BIDU), Alphabet Inc. (NASDAQ:GOOGL), Raytheon Corp. (NYSE:RTN), Stepan Co. (NYSE:SCL), United Parcel Service Inc. (NYSE:UPS) and Wal-Mart Stores Inc. (NYSE:WMT). The second column details the “Gain %” while the rightmost column details the “Gain.”

For the “Gain %” column, we compute the gain as the difference between the current price and the first transaction price divided by the first transaction price. For example, consider Apple. The portfolio manager first invested in 300 shares for $115.82 per share on Jan. 2. Since Apple currently trades at $170.47, the “Gain %” for Apple is ($170.47 - $115.82) / $115.82, or 47.43%.

The “Gain” column contains two values: a dollar gain and a percent gain. For the dollar gain, we take the sum of all sell transactions in a stock and add it to the current position (current price times current shares). We then subtract the sum of all buy transactions in the stock.

Let’s illustrate this with an example: in the above portfolio, the manager added 700 shares for $160.86 per share on Sept. 12, the day Apple CEO Tim Cook launched major products like the Apple Watch S3 and the iPhone X. The manager’s dollar gain in Apple is $23,122, which equals 1,000 shares * $170.47 minus the sum of the two buys: 300 shares * $115.82 and 700 shares * $160.86.

The percent gain on a stock is simply the dollar gain divided by the total investment in the stock, including commissions. Suppose brokers charge a $25 commission for Apple trades due to high trade demand. The manager’s total investment in Apple is then the sum of the two buys plus $50, the total commission for the two trades. Based on our calculations, the manager’s total percent gain in Apple is 15.88%. Note how this differs from the 47.43% we computed in “Gain %.” Remember that “Gain %” only considers the first transaction price while the “total percent gain” considers all transactions in a stock.


The “Gain %” in the summary row is simply the average “Gain %” from each of the positions in a portfolio. The “total summary percent gain” is more involved: we first compute the total dollar gain from each position and divide by the entire portfolio investment, i.e., the total investment for each position including all commissions.

GuruFocus provides an eclectic variety of features within My Portfolios. Not only can you generate custom portfolio views, you can also create an email alert when a stock in your portfolio exceeds or falls below a target price or price-earnings ratio.


Premium members can view their portfolio’s performance relative to the S&P 500 and the Peter Lynch Chart for each of their stock holdings within a portfolio. Premium Plus members can view the Manual of Stocks for their portfolio holdings.

Disclosure: The author has no positions in the stocks mentioned.

About the author:

James Li
I am an editorial assistant and researcher at GuruFocus. I have a Master's in Finance from SMU, and I enjoy writing reports on financial trends and investor portfolios. Follow me on Twitter at @JamesLiGuru!

Visit James Li's Website

Rating: 0.0/5 (0 votes)


James Li
James Li premium member - 8 months ago

As of Feb. 12, the "Gain" column now includes the dividends earned since purchase:

Gain : Gain = current shares * current price + sum(shares sold * price sold) - sum(shares bought*price bought) - commissions + dividend earned since purchase

% =Gain / sum(shares bought*price bought - commissions)


Please leave your comment:

Performances of the stocks mentioned by James Li

User Generated Screeners

aboer52-41 Downies
aboer52-29 DN Prof▼5Pred▼1Pi▼5J
aboer52-36 Bottom 20% of industries
aboer52-165 Bad ROE
aboer52-225 dn Op Mgn < 20th percenti
aboer52-451 dn Warn><1 Finan<6 Profit
aboer52-88 Profit<=5 Warnings >=3
aboer52-356 DN <6<6
aboer52-178 DN <6<6 Benish>-5 AZ<3
aboer52-104 DN Piot<=3
Get WordPress Plugins for easy affiliate links on Stock Tickers and Guru Names | Earn affiliate commissions by embedding GuruFocus Charts
GuruFocus Affiliate Program: Earn up to $400 per referral. ( Learn More)

GF Chat