Do tech companies deserve their high stock prices?

Do tech companies deserve their high stock prices?

The darlings of tech just put up some mighty big numbers.

Apple (AAPL), Google, Facebook (FB) and Amazon.com each reported quarterly results over the past two weeks that topped analysts' lofty estimates.

That's just what investors were expecting. All of those companies have blown past the S&P 500 this year, led by Amazon's (AMZN) 73 percent rally. Apple has been the weakest performer of the group, gaining 11 percent, still more than four times the increase in the broad index.

Read More Amazon stock soars

The story varies for each, but the consistent themes are expanding market share and rising margins as investments in emerging businesses bear fruit. All four are rapidly expanding their brands globally, while weathering an unfavorable currency environment and busting into new markets that go well beyond their core.

Nowhere is that more evident than at Amazon, which reported an unexpected profit, thanks to surprisingly large growth in its cloud-computing division, Amazon Web Services.

"Amazon has emerged from its extensive and extended investment cycle a bigger, stronger, faster company than we anticipated," wrote Stifel Financial analyst Scott Devitt, in a July 29 report, upgrading the shares to a "buy."

Google (GOOGL) and Facebook continue to dominate the online advertising market and are proving plenty capable of surviving the rapid transition to mobile.

Facebook, the last of the big four to report results , was once considered a laggard in mobile. Now, ads on devices in our pockets account for 76 percent of revenue, up from 62 percent a year earlier.

With brands getting a better return on their Facebook ad investments, the social network is able to reel in costs. It spent less money than expected in the quarter, with revenue of $4.04 billion that also was better than analysts expected.

Read More The next stage for Facebook?

"As long as it remains the most engaged network, then it will take most of the social and mobile advertising dollars," said Mark Hawtin, investment director at GAM, which owns Facebook shares. Hawtin appeared on CNBC after Facebook's results on Wednesday.

At Google, new Chief Financial Officer Ruth Porat had a successful debut in the search engine's second-quarter earnings report.

Porat said that monetization between Web and mobile is narrowing. Revenue growth slowed to 11 percent from 22 percent a year earlier, and met expectations at $17.7 billion. Net income came in well ahead of estimates as Google showed restraint in its operating expenses.

For Apple, the driver remains the iPhone, with sales of that device surging 59 percent to $31.4 billion, accounting for almost two-thirds of total revenue.

Apple's China business more than doubled in the quarter to over $13 billion. That should further bolster global market share for iOS, which increased to 18.3 percent in the first quarter from 15.2 percent in the fourth, according to IDC. Android has dominant share at 78 percent.

While all four companies exceeded estimates, the stocks had mixed performances.

Read More Apple's real earnings problem: The forecast

Amazon and Google soared; Apple and Facebook slipped.

Apple's dip came after the company's fourth-quarter sales forecast trailed analyst estimates.

Commentary around Facebook suggests the stock was due for a pullback after an extended run. After all, this is a $267 billion company with $12.5 billion in annual sales last year, a price-to-sales ratio dramatically higher than any of the other mega-cap tech companies.

Read More Google, Facebook and then who?

"It's had almost a 20 percent run-up in the past five or six weeks ahead of the earnings, so maybe a little bit of a selloff is expected," Ivan Feinseth, chief investment officer of Tigress Financial Partners, told CNBC. "The results were phenomenal."

As much as anything, the recently completed quarter shows the titans of U.S. tech are consolidating their control, not relinquishing it.



More From CNBC