Despite Facebook's (NASDAQ:FB) apology this year for serving up Russian ads that were meant to incite division in the 2016 U.S. election, Facebook has had a pretty great 2017. The company has beaten analysts' consensus earnings and revenue estimates repeatedly this year, it passed the 2 billion user mark, and its share price is up about 50% over the past 12 months.

But there are plenty of other top technology stocks that have had similar share-price gains over the past year. Two of them, Apple (NASDAQ:AAPL) and (NASDAQ:AMZN), have seen their share prices match, or surpass, Facebook's gains -- and both of them are on track for great 2018. Let's take a closer look at what both companies are doing right now and why their shares are likely to continue climbing into the coming year.

Bart chart with arrow pointing up.

Image source: Getty Images.

Amazon's continued strength

It may be no surprise that Amazon is keeping company with the likes of Apple and Facebook when it comes to share-price gains, but it's only within the past month that Amazon's stock price surged to match its tech peers, and it's now up about 54% over the past 12 months.

Amazon's shares jumped after the company reported a stellar third quarter, including net income that beat the company's own guidance. Amazon's management was expecting an operating income performance of between a $400 million loss and a $300 million gain. With that expectation, investors were pleased to see operating income hit $347 million in the quarter, which, in turn, pushed up net income to $256 million.

The company also managed to grow revenue by 34% year over year, and if we back out the sales that came from Amazon's purchase of Whole Foods Market, the company still increased revenue by 29% year over year.

Of course, I can't mention how well Amazon is doing without talking about the company's biggest profit-driver: Amazon Web Services (AWS). The company's AWS sales increased by nearly 42%, and operating income jumped by 36%, to nearly $1.2 billion.

If investors are skeptical that Amazon can keep these good times rolling, they should think again. Management expects the company's fourth-quarter sales to increase to $58 billion, at the midpoint, which would represent a 33% year-over-year jump.

Looking further out, Amazon still has plenty of room to grow not just from its e-commerce sales, but also from its expanding AWS cloud business. Research firm Gartner expects cloud computing to become a $411 billion market by 2020, and Amazon is leading its cloud competitors right now with about 40% of the market. 

Woman working in Amazon fulfillment center.

Image source:

Apple's ongoing opportunities

Similar to Amazon, Apple's share spiked after the company released its latest quarterly earnings. Apple far surpassed analysts' consensus earnings estimate of $1.87 -- Apple reported $2.07 instead -- and the company beat its own revenue guidance as well. Management forecast $52 billion at the high end and inched slightly past that to $52.6 billion in the fiscal fourth quarter of 2017.

Apple sold 46.7 million iPhones in the fourth quarter of fiscal 2017, and investors can probably expect more good news in the next quarter. Reports of production delays for the iPhone X didn't hamper the company's fiscal first-quarter 2018 outlook, and Apple's management expects revenue to be between $84 billion and $87 billion. If it hits that number, it'll be a blowout quarter for Apple's sales and outpace analysts' consensus estimates. 

Apple's dependence on its iPhone is still very strong, but the company is also focusing on new areas of growth as well, especially within its services segment. Apple CEO Tim Cook said at the beginning of the year that he wants the company's services revenue -- which mainly consists of sales from the App Store, iCloud, and Apple Music -- to reach $50 billion by 2020. Apple made some significant gains in the quarter to that end, with sales from services reaching nearly $30 billion for the full year.

While Apple's fiscal fourth quarter of 2017 was great, there's probably much more in store for the company next year, and beyond. For example, rumors have been swirling that Apple will release its own set of augmented reality (AR) glasses in 2020. Apple is notoriously secretive, so there's no telling whether that device, or something similar, will materialize by then, but Cook has indicated that AR is becoming increasingly important to the company.

On the latest earnings call, he said, "Put simply, we believe AR is going to change the way we use technology forever."

I think Apple's foray into AR could eventually become a much bigger part of the company's long-term focus, and that opens up all sort of possibilities. The AR market is expected to be worth $61 billion market by 2023, which leaves an entirely new avenue for Apple to pursue in the coming years.

More to come

Facebook, Apple, and Amazon's shares are all riding high this year, mainly because each company is doing a great job of executing their management's plans and persuading their users and buyers to stick with their platforms, products, and services.

There's no guarantee that the coming quarters will be as good for investors as this year has been, but investors should be optimistic that the products and services these companies are building will continue to fortify these already strong tech players.