PepsiCo (PEP 1.65%), the global snack and beverage company behind brands such as Pepsi, Lay's, Mountain Dew, Gatorade, Tropicana, Doritos, and Aquafina, released second-quarter earnings on July 23 and the results more than satisfied expectations. The company's stock responded by jumping over 1.8% higher, setting a new all-time high in the process, and investors are hopeful that this is the beginning of a sustained rally. Let's break down the results and PepsiCo's outlook on the rest of 2014 to determine if we should be buying long-term positions right now or if we should wait for shares to come back down a bit.

Source: PepsiCo

Surpassing the expectations with ease
Second-quarter earnings were released before the market opened on July 23 and the results exceeded expectations on both the top and bottom lines. Here's a summary of the key statistics:

MetricReportedExpectedYear Ago
Earnings Per Share $1.32 $1.23 $1.31
Revenue $16.89 billion $16.79 billion $16.81 billion

Source: Benzinga

Core diluted earnings per share increased 0.8% and revenue increased 0.5% year-over-year as global volume remained flat and organic sales increased 3.6%. Here's a breakdown of PepsiCo's revenues by segment:

SegmentQ2 2014 Revs.Q2 2013 Revs.Change
PepsiCo Americas Beverages $5,281 million $5,260 million 0.4%
Europe $3,657 million $3,653 million 0.1%
Frito-Lay North America $3,387 million $3,332 million 1.7%
Latin America Foods $2,122 million $2,116 million 0.3%
Asia, Middle East, & Africa $1,883 million $1,869 million 0.7%
Quaker Foods North America $564 million $577 million (2.3%)
Total Revenues $16,894 million $16,807 million 0.5%

Source: PepsiCo

As you can see, PepsiCo's quarterly revenue growth was driven by its Frito-Lay segment, and this has been a common theme over the last few quarters. This snack division, which includes brands such as Doritos, Tostitos, Cheetos, Sun Chips, Ruffles, and Stacy's in addition to its namesake brands, has given PepsiCo an edge over its pure-play beverage competitors since soda consumption has been on a steady decline in the United States due to a more health-conscuious consumer. 

Source: Pepsi's Facebook

PepsiCo's gross profit increased 2.3% to $9.12 billion and its operating profit increased 1% to $2.90 billion. In relation, the company's gross margin expanded 96 basis points to 53.96% and its operating margin expanded 7 basis points to 17.14%. The expansion of PepsiCo's margins can be attributed to effective revenue management strategies, productivity initiatives, and costs of goods sold decreasing 1.5% year-over-year.

The strong results above led to PepsiCo's net cash provided by operating activities totaling $2.49 billion and the company spent $566 on capital expenditures, resulting in $1.93 billion of free cash flow. The company used this free cash and $9.84 billion in cash and cash equivalents to begin the repurchase of approximately $950 million worth of its common stock and pay out approximately $864 million in dividends. PepsiCo went on to proudly note that it is on pace to return a total of $8.7 billion to shareholders in the form of dividends and share repurchases in fiscal 2014.

Overall, it was an outstanding quarterly performance for PepsiCo. The sentiment got even more positive when the company went on to provide its updated outlook on fiscal 2014.

What will the remainder of the year hold?

Source: PepsiCo

As a result of PepsiCo's strong year-to-date financial performance, the company announced that it was increasing its full-year, core constant currency earnings per share forecast. The company now anticipates 8% growth from the $4.37 earned in fiscal 2013, resulting in earnings per share of about $4.72 in fiscal 2014, instead of its previous outlook of 7% growth. 

In addition, PepsiCo continues to anticipate $1 billion in productivity savings, $10 billion in net cash provided by operating activities, and more than $7 billion in free cash flow in fiscal 2014, along with approximately $5 billion in share repurchases and $3.7 billion in dividend payments. This expectation of $8.7 billion in shareholder returns proves that the company is still fully dedicated to maximizing shareholder value.

The Foolish bottom line: Should PepsiCo be bought?

Source: Pepsi's Facebook

PepsiCo is home to some of the most popular food and beverage brands in the world, and this led to strong second-quarter earnings that exceeded expectations. The company's stock reacted to the news by spiking 1.85% higher in the trading session, reaching new all-time highs in the process. Even with its stock trading at these new highs, I believe that it represents one of the best investment opportunities in the market. It trades at just 18.5 times forward earnings estimates and has a bountiful 2.9% dividend, which it has raised for 42 consecutive years. For all of these reasons, Pepsi is definitely worth a closer look by Foolish investors.