When it comes to the stock market, tech companies don't exactly have the best reputation for stability -- albeit with good reason. The world of technology is known for bringing rapid change, and volatility tends to come with the territory.

But that doesn't mean tech stocks can't help you sleep better at night. To the contrary, I think long-term investors can rest easy owning two of the world's biggest tech names: Amazon.com (AMZN 1.49%) and Facebook (META 0.14%).

Businessman sleeping at his keyboard

IMAGE SOURCE: GETTY IMAGES

Disrupting with Amazon

Shares of Amazon.com don't exactly look cheap, trading at 182 times trailing-12-month earnings, and nearly 85 times this year's earnings estimates. But they seldom do based on traditional valuation metrics, primarily because the company regularly eschews profitability to build the business by growing revenue and taking market share. 

It seems an understatement to say Amazon has succeeded -- and continues to do so -- to that end. Revenue last quarter climbed an incredible 22.6% year over year (24% at constant currency) to $35.7 billion. That top line included a 16% increase in retail product sales to $22.83 billion, 36% growth in retail third-party seller services to $6.44 billion, 52% growth in retail subscription services (thanks largely to growth in Prime memberships) to $1.94 billion, and 43% growth from the company's thriving Amazon Web Services (AWS) division to $3.66 billion. The lucrative AWS business, in particular, is beginning to enjoy higher operating leverage and contributing more to Amazon's bottom line; it delivered greater than 24% operating margin last quarter, compared with under 3% for Amazon's North American e-commerce business and negative operating income in the younger international e-commerce segment.

What's more, last month Amazon planted the seeds for its future disruption of the grocery industry, agreeing to acquire organic grocery chain Whole Foods Market for $13.7 billion. As Amazon's global influence continues to grow -- and even with shares up around 30% so far in 2017 -- I think patient investors can enjoy continued market-beating gains holding Amazon stock for years to come.

Connecting the world with Facebook

Meanwhile, Facebook is enjoying incredible momentum monetizing its unrivaled social-media platform. Revenue last quarter skyrocketed 49% year over year to $8.03 billion, driven by 51% growth in advertising revenue to $7.86 billion. Facebook can largely credit that strength to its progress in mobile ads, which comprised around 85% of the latter total.

On the bottom line, Facebook's quarterly net income increased an even better 76% to $3.06 billion, and net income per share rose 73% to $1.04. That makes Facebook stock look like a mouthwatering bargain, trading at roughly 39.4 times trailing-12-month earnings, and 25.2 times this year's estimates.

And Facebook's growth isn't just from more efficient monetization. Monthly active users rose 17% to 1.94 billion in Q1. And daily active users weren't far behind, climbing 18% to 1.28 billion and demonstrating how sticky Facebook has become.

"We had a good start to 2017," Facebook founder and CEO Mark Zuckerberg succinctly stated at the time. "We're continuing to build tools to support a strong global community."

Two-thirds of the world's population still doesn't have access to the internet, according to Internet.org, a Facebook-led initiative "with the goal of bringing internet access to and the benefits of connectivity to the portion of the world that doesn't have them."

Let it suffice to say that as Facebook helps bring that goal to fruition, it stands to benefit in a big way as billions of new users discover its utility. So, similar to Amazon, I think Facebook shareholders would do well to buy shares now before that happens.