A lot of software companies have been on a wild ride these past few years, swinging between surges and plunges in true growth stock nature. As the world becomes more digital-dominant and cloud-based, software companies will likely become more common -- some with long-term potential as companies, many without it. The key is investing in the former.

Here are two software stocks you can feel comfortable holding on to for the long haul.

1. Snowflake

Snowflake (SNOW 3.69%) is a company aiming to have an all-in-one data ecosystem. It began with its flagship data warehousing platform, which lets companies analyze data from most major cloud platforms like Amazon Web Services and Microsoft Azure. It's since introduced a similar platform aimed at letting software engineers cross-collaborate between programming languages, and now it has its eyes set on artificial intelligence (AI). 

Investors weren't too happy about management lowering its revenue guidance for its fiscal year (FY) '24, causing the stock to drop over 9% in two days, but I believe the long-term investment case for Snowflake remains strong. Big data, cloud services, and AI all seem to be on the earlier ends of what they can become, and Snowflake is positioned to benefit from the organic growth of all three.

Snowflake says its total addressable market (TAM) will be around $290 billion by 2027. That's more than double its $140 billion TAM in 2022 and would be a compound annual growth rate (CAGR) of around 15% if it plays out that way. Considering Snowflake's industry position and growth so far, 15% annual growth looks like a more conservative estimate.

Snowflake's Forbes 2000 customers (the top 2,000 companies in the world by market value, sales, profits, and assets) will be a key part of its revenue growth because those companies have large wallets and will likely spend more as they themselves grow.

In its FY21, Snowflake's Forbes 2000 customers spent an average of $600,000 over a trailing-12-month span. In FY22, that increased to $900,000; in FY23, it again increased to $1.4 million.

Chart showing Snowflake's customer growth by money spent.

Image source: Snowflake 2023 Investor Day presentation.

The Forbes 2000 won't be Snowflake's saving grace, but it's important to keep them around and continue attracting more companies from that group. As of its first-quarter FY24, Snowflake had penetrated 30% of the Forbes 2000, up from 16% just two years prior. Increasing this number is a surefire way to ensure cash flow remains healthy into the future.

With a price-to-sales ratio of 19, Snowflake is more expensive than many of its competitors. However, this shouldn't be a deterrent if you're investing for the long haul.

2. CrowdStrike

As companies across various industries scramble to assemble their AI playbook, CrowdStrike (CRWD 2.03%) must feel like the veteran at the table. CrowdStrike essentially pioneered AI-based cybersecurity solutions when it released its Falcon platform in 2011. Fast forward to now, and the company has released nine modules that have turned it into an industry leader.

Cybersecurity has become a necessary expense for many companies, especially those who operate online. Considering how expensive cyberattacks can be, it's an insurance-like service that's beyond easy to justify.

The average cost of a data breach globally in 2022 was $4.45 million (15% more than in 2019). In the U.S., it was $9.44 million, and it likely won't be getting any cheaper. IBM's 2023 Cost of a Data Breach report estimates that companies that use AI-powered cybersecurity solutions save an average of $1.76 million compared to companies that don't. Not a bad selling point.

CrowdStrike's TAM is increasing at a good clip, ensuring good growth if the company can at least grow at a market pace. Its current TAM is $76 billion, with a projection of $158 billion by 2026. Over the long haul, McKinsey estimates the total cybersecurity market could be $1.5 trillion to $2 trillion. Assuming that's true, the potential market is only around 10% penetrated.

As of its Q1 FY24, CrowdStrike had $2.73 billion in annual recurring revenue (ARR), up 42% year over year. Company management has set a goal to hit $5 billion by 2026, which should work wonders for the $227 million in free cash flow it brought in last quarter. For a subscription-based business like CrowdStrike, both ARR and free cash flow are pivotal to its continued growth.

CRWD Free Cash Flow Chart

Data by YCharts

I'm confident those metrics are headed in the right direction and will produce good long-term value.