Terrific growth in revenue and earnings at Ambarella (AMBA 0.49%) and Fortinet (FTNT 1.74%) has translated into outstanding stock market gains. Both tech stocks have more than doubled over the past year as investors have cheered their consistent growth and bright prospects.

AMBA Chart

AMBA data by YCharts.

But it's not too late to buy shares as these companies are operating in fast-growing markets that have a lot of room to expand. What's more, both companies are growing at a faster pace than the markets they operate in, which makes them ideal bets to tap into the booming demand for internet-enabled cameras and the increasing need for cybersecurity solutions.

Let's look at reasons Ambarella and Fortinet could sustain their impressive stock market momentum and keep delivering eye-popping upside to investors.

Two people sitting with a suitcase of cash and high-fiving in a car.

Image source: Getty Images.

Ambarella

Ambarella has staged a remarkable turnaround in its current fiscal year, which started Feb. 1 The company's revenue for the first six months of fiscal 2022 shot up nearly 43% year over year to $149.4 million. Its adjusted earnings per share jumped nearly sixfold to $0.58 in the first half of the fiscal year from $0.10 in the prior-year period.

This is a huge turnaround in Ambarella's fortunes as revenue declined 2.4% in fiscal 2021 to $223 million. Its adjusted EPS was down to $0.33 last year from $0.69 the year before. The company's performance in the first half of the current year indicates that it is well on track to put in a substantially better performance in fiscal 2022.

The company's fiscal third-quarter outlook indicates the same, as it expects $90 million in revenue at the midpoint of its guidance range. That would be a 60% increase over the prior-year period's revenue, which means Ambarella's top-line growth is expected to pick up the pace as compared to the first half of the year.

Analysts expect the company to finish the fiscal year with a 47% jump in the top line, while earnings are expected to jump to $1.48 per share from $0.33 last year. Even better, Ambarella's sizzling momentum is expected to continue, with analysts forecasting 82% annual earnings growth for the next five years.

Ambarella has all the ingredients of remaining a top growth stock in the long run, and that's not surprising given the fast-growing markets the company serves. For instance, in the automotive camera market, Ambarella sees its addressable market expanding from around $1.4 billion in 2019 to nearly $5 billion by 2025. The good part is that the company has been scoring design wins in this segment.

Throw in the opportunities for its Internet of Things-enabled security cameras, where an upgrade cycle is underway, and it isn't too difficult to see why the company is expected to clock a high growth rate in the long run.

Fortinet

Cybersecurity specialist Fortinet has outpaced the broader market's growth, and the cybersecurity market's growth, over the past several years. In 2020, Fortinet delivered 20% top-line growth, and it is on track to eclipse that in 2021.

In the first six months of 2021, Fortinet's revenue increased 26% over the year-ago period. Analysts expect the company to end the year with a 25% increase in the top line. More importantly, Fortinet could sustain its high levels of growth in the long run given the massive end-market opportunity it is sitting on.

The company sees its total addressable market hitting $93 billion by 2024, as compared to $65 billion last year, which translates into compound annual growth of 9.7%. Network security will be the biggest end-market for Fortinet with $48 billion in revenue anticipated by 2024, driven by  increasing demand for cloud computing, 5G wireless networks, and software-defined wide-area networks (SD-WANs).

Fortinet is making steady progress in these areas. New deals have helped push the number of its overall deals exceeding $1 million in value to 79 in the second quarter from 59 in the year-ago period.

Fortinet has also seen a sharp increase in the number of deals exceeding $500,000 in value over the past few years. In 2017, the company had struck 358 such deals, and that number rose to 639 in 2020. Fortinet has recorded 370 deals valued over $500,000 in the first two quarters of 2021.

Additionally, Fortinet has witnessed an uptick in the average contract length. In the second quarter of 2021, it increased by two months year over year to 28 months.

This combination of bigger deals and longer contracts indicates that buyers are willing to spend more money on Fortinet's offerings. Not surprisingly, deferred revenue in the second quarter increased 27% year over year to $2.91 billion. Deferred revenue is the money collected in advance by a company in lieu of services that will be delivered later.

The money collected is recognized as revenue once the services are delivered. It is worth noting that Fortinet's deferred revenue pipeline is equal to the revenue it has generated in the past year, which points toward improved top-line performance in the future.

In all, Fortinet seems like a solid play on the cybersecurity market considering its robust balance sheet, higher customer spending, and the ability to win market share in lucrative areas such as next-generation firewalls.