If you believe that gold still has room to run and that the stock market is not going to fall precipitously any time soon, then you might be thinking about investing in gold mining companies, whose value fluctuates depending on those two aforementioned factors. Two of the largest mining companies are Barrick Gold (NYSE: ABX) and Goldcorp Inc. (NYSE: GG).

In my analysis, I tend to rely heavily on analyst opinion and estimates. I figure they have been studying the stock for a while and probably have a better handle on the numbers than I do. I do look at current news, as well, but I like to lean more on the numbers to provide an objective recommendation.

Barrick is currently trading at about $39, about 10% up from its 52-week low of $34.82 reached in May. It has a PE of 8.6 and pays a 2.1% dividend. The current analyst rating is a 2.0 (1.0 = Strong Buy, 5.0 = Sell) with a mean target price of $59.14. There are 8 Strong Buy recommendations, 12 Buys, and 8 Holds.

The fiscal-year 2012 consensus earnings estimate is $4.68, which is only a penny greater than actual 2011 earnings of $4.67. The estimate for fiscal-year 2013 is $5.65, 21% higher than 2012.

The stock is down 14% year-to-date, and down 12% from this time last year. The current estimated annual growth rate for the next 5 years is 34.75%, compared to an industry average of 26.83% and a sector average of 11.01%.

Goldcorp is also trading at approximately $39 per share, up 21% from its 52-week low of $32.16. It has a PE of 20.7 and pays a 1.4% dividend. Currently analysts rate it a 2.0 (4 Strong Buys, 13 Buys, and 5 Holds) with a mean target price of $59.05.

Goldcorp's fiscal-year 2012 consensus earnings estimate is $2.29, 3% higher than actual 2011 earnings. Its estimate for fiscal-year 2013 is $3.21, 40% higher than 2012.

The stock is down 16% since the beginning of 2012, and down 11% from a year ago. Current 5-year annual growth is estimated at 11.14% vs the S&P at 10.77%.

The numbers are eerily similar to a point. Current price, similar historical prices, similar analyst estimates. Barrick, however, has a much higher earnings-per-share number, and a far better 5-year-growth percentage. So why does Goldcorp merit a PE of twice Barrick's?

Eventually, however, I go back to the numbers. With Barrick's current PE (in my opinion, too low) and year-end 2013 earnings estimate, I see a stock price of $49, or upside of 26%. Goldcorp's PE and earnings estimate leads to a stock price of $66, 70% upside.

Analysts offer a mean target price of $59 for both companies, which I am more inclined to accept, and which is an increase of 50% for both companies. I personally like Barrick's position as the largest gold mining company in the world and its 35% 5-year growth estimate.

**Disclosure: **I have no positions in any stocks mentioned, and no plans to initiate any positions within the next 72 hours.