So far, 2023 has been an exceptional year for those investing in software stocks. Most companies operating in the technology sector have seen their valuations surge, as investor confidence returns to higher-growth segments of the market. 

Of course, whether this trend continues for the remainder of the year, or if a sell-off awaits, remains the key question on the minds of most investors.

Indeed, many of the same headwinds that persisted last year haven't gone away. The Federal Reserve is still raising interest rates, putting a damper on the valuations of longer-duration assets. The yield curve remains severely inverted, signaling a potential recession could be on the horizon. And corporations everywhere are cutting costs, which doesn't bode well for many of the top enterprise-oriented software companies out there. 

That said, there are a few software stocks I think are worth considering amid this indecisive price action in markets. Here are my top two picks for long-term investors to consider right now.

Constellation Software

Constellation Software (CNSWF -1.38%) may not be on most investors' radar screens. This Canadian software company trades over the counter, and is therefore covered mainly by analysts from lesser-known Canadian banks.

However, Constellation Software is a $35 billion market cap software conglomerate I think is worth diving into. This company's focus over many years has been to acquire, develop, and manage vertical market software businesses. Constellation's industry-specific software solutions provide mission-critical services to public and private sector markets in Canada, the U.S., the U.K., and Europe.

Established in 1995, Constellation Software has become the go-to for businesses looking for reliable, innovative, and specialized software solutions. With its comprehensive offerings, it strives to stay ahead of the competition and maintain its status as a leader in its industry. 

The four most recent analyst reports on Constellation Software are unanimous -- this company is a buy. The average price target on this stock suggests 25% upside over the next year. 

Much of that bullish view comes from a number of acquisitions early this year, including Wide Orbit, which will be merged with one of the company's core divisions. Various spinoffs and other value-creating activities are also in the works, with Constellation remaining one of the best companies of its peer group in terms of aggregating software companies into its conglomerate model while spinning others out.

If Constellation is able to continue to improve the return on invested capital of its acquisitions over time, this is a growth-via-acquisition play in the software sector that should continue to provide impressive compounding over the long term. (One look at Constellation's long-term historical stock chart says it all.)

Microsoft

Perhaps the world's best-known software stock, Microsoft (MSFT 0.37%) remains a top pick of many long-term investors. 

This mega-cap tech giant is among the most consistent growth stocks among its similarly sized peers. Compared to rival Apple, Microsoft's average revenue and earnings-per-share growth over the past five years (15.6% and 36.5%, respectively) are much more attractive. This is partly reflected in the company's slightly higher multiple, though I think the quality of Microsoft's earnings may be undervalued by the market right now.

Microsoft's core software business provides much steadier cash flows than many of its mega-cap tech peers, such as Apple. Whereas Apple's business is mainly focused on selling high-end discretionary consumer goods (along with high-margin services), Microsoft's essential monopoly on critical software spanning the enterprise and retail markets provides extremely steady cash-flow growth over time. 

Additionally, Microsoft's 23% global market share in cloud computing is noteworthy. For those bullish on the future of the cloud, Azure is proving to be a formidable force, gaining 2 percentage points of market share over the past quarter, relative to rival Amazon, which leads the pack.

The company's recent results have been less than stellar, with Microsoft posting revenue growth of only 2% in its December quarter and providing a forecast that didn't impress investors. However, over the long term, the company is certainly moving in the right direction with respect to its core cloud business, with its cash flows anchored by its rock-solid software business.

That's not even touching on what most investors are fawning over when it comes to Microsoft right now: its massive investment in ChatGPT. The company's recent $10 billion investment in ChatGPT has spurred a flurry of interest in this stock, given the initial uptake from users in recent months. Notably, Microsoft has been moving quickly on integrating this technology into its suite, announcing just last week that its Azure OpenAI Service will provide ChatGPT functionality for corporate clients.

Software can be an exciting area to invest in

Both Constellation Software and Microsoft are solid long-term investments for those looking to diversify their portfolios in the software industry. These businesses are well-run, historically profitable behemoths in their respective niches. For growth investors with a long-term investing time horizon, there are few better options to consider in these current market conditions, in my view.

Sexier areas of technology will aways exist. Software in and of itself isn't an intriguing place many investors may spend a tremendous amount of time looking at. That said, for those looking for cash-flow stability and balance sheet strength, these two companies are worth diving into right now.