Data breaches, ransomware attacks, and other types of cyberattacks have cost organizations tens of billions of dollars in recent years. The total number of cyberattacks worldwide skyrocketed 50% in 2021, according to Check Point Research, and peaked at a whopping average of 925 weekly attacks per organization last December.

That escalation has sent organizations scrambling to upgrade their digital defenses. It's also turned many leading cybersecurity stocks into evergreen investments that are resistant to macroeconomic headwinds.

Two programmers working on a computer.

Image source: Getty Images.

Two promising stocks in that sector are Fortinet (FTNT 0.46%) and Tenable (TENB 0.45%). Let's take a closer look at these two cybersecurity companies and see which is the more well-rounded investment. 

What do Fortinet and Tenable do?

Fortinet's main product is a next-gen firewall called Fortigate, which it installs through a network of on-site appliances called the "Fortinet Security Fabric." This platform provides end-to-end protection for on-premise, cloud-based, and Internet of Things (IoT) devices.

Fortinet serves over half a million customers globally, including the majority of the Fortune 500, and leverages its artificial intelligence and machine learning algorithms to analyze over 100 billion events daily.

Tenable's enterprise-facing platform, Nessus Professional, scans an organization's entire infrastructure for security vulnerabilities like weak passwords, misconfigured software, and network flaws. It also offers a free version for home networks. That proactive approach can prevent devastating attacks from ever happening.

Tenable currently serves about 40,000 customers worldwide, including 60% of the Fortune 500 and 40% of the Global 2000.

How fast is Fortinet growing?

Fortinet's revenue rose 20% in 2020 and grew 21% to $3.34 billion in 2021. It expects its revenue to grow 28%-29% this year. Its recent exit from Russia might initially reduce its annual revenue by 2%-3% this year, but it could potentially offset that loss by gaining more customers elsewhere -- especially if Russia escalates its cross-border cyberattacks.

Moreover, Fortinet's 32.5% year-over-year growth in deferred revenue at the end of 2021, which accelerated from its 23.5% growth in 2020, indicates there's still plenty of pent-up demand for its products -- and that its exit from Russia will merely be a speed bump for its long-term growth. 

Unlike many other high-growth cybersecurity companies, Fortinet is firmly profitable by both generally accepted accounting principles (GAAP) and non-GAAP measures. Its non-GAAP earnings per share (EPS) increased 34% in 2020 and 19% in 2021, and it expects 22%-25% growth in 2022.

How fast is Tenable growing?

Tenable's revenue rose 24% in 2020 and grew 23% to $541 million in 2021. It expects its revenue to increase 22%-24% in 2022.

Tenable generated 58% of its revenue in the United States in 2021, and no other market accounted for over 10% of its revenue. It doesn't seem to do any significant business in Russia, and it hasn't issued any statements about its exposure to the Russo-Ukrainian war yet.

Last year, Tenable bundled together all of its risk-based exposure tools into a single platform called Tenable.ep. It's also been expanding its subscription-based cloud platform, Tenable.io, to lock in even more customers. Its 30% growth in deferred revenue in 2021, which accelerated from its 2% decline in 2020, indicates there's plenty of pent-up demand for those services.

Tenable remains unprofitable by GAAP measures, but it turned profitable on a non-GAAP basis in 2020. Its non-GAAP EPS jumped 79% in 2021, but it's bracing for a 44%-56% decline this year as it ramps up its spending.

The valuations and verdict

On a non-GAAP basis, Fortinet trades at 65 times forward earnings. Tenable has a forward P/E ratio of more than 300.

Both of those multiples are high, but higher-growth cybersecurity companies are generally valued by their top-line growth until they lose their momentum. By that measure, Fortinet trades at 12 times this year's sales, while Tenable trades at nine times this year's sales. Both price-to-sales ratios are fairly reasonable for companies that generate more than 20% revenue growth.

Fortinet and Tenable are both promising cybersecurity plays, but I believe Fortinet's stronger top-line growth and stable GAAP profits make it a better overall investment in this challenging market.