Salesforce (CRM -1.59%) has long been a cloud-based software darling. The company's wildly popular customer relationship management (CRM) software has given its corporate users' sales teams the collaboration and marketing tools to strengthen customer relationships and expand their sales opportunities. In short, Salesforce helps its users increase their revenue and become much more efficient.

When examining Salesforce's revenue history, it's easy to see its products work. After a few years of working on its platform and attracting early adopters, Salesforce went public in June 2004. It finished its fiscal year ended Jan. 31, 2005 with $176 million in recurring software revenue. Seventeen years later, the company had grown its revenue 150-fold to $26.5 billion. That breathtaking top-line growth has done wonders for the stock.

Salesforce stock closed its first day of trading at a split-adjusted $4.30 per share. If you nabbed shares at that price and never sold them, your shares would've grown to $254.13 per share at the end of 2021, yielding you a return of about 5,800% over a period that included the Great Recession and COVID-19 bear markets.

But that was the past -- investors want to know about the future.

Cloud icon with ones and zeros streaming around it.

Image source: Getty Images.

Salesforce revealed exciting forecasts at its annual Dreamforce conference

Earlier this month, Salesforce management told investors it can nearly double its revenue to $50 billion in fiscal 2026, just three years away. Although the forecast seems aggressive, it's in line with historical revenue growth. However, Wall Street wants to start seeing the company generate more profits.

In fiscal 2022, revenue totaled $26.5 billion with an adjusted operating margin of 18.7%. But management addressed profitability during the investor day too, calling for its operating margin to increase to at least 25%. If that target holds, adjusted operating income will surge from $5.0 billion in fiscal 2022 to $12.5 billion in just four years.

The company's profitability potential may be why Goldman Sachs analyst Kash Rangan stands by his bullish price target for the stock, despite its mighty tumble this year.

Rangan believes Salesforce stock will go to $320

After the Dreamforce conference, Rangan reiterated his price target of $320 per share, implying the stock could more than double from current levels. He believes Salesforce's operating margin can fly past its 25% forecast to between 35% and 40% beyond 2026.

And he might be right. He points to the company's near-term operating margin guidance of 20.4% for this fiscal year, which puts it on pace to meet its fiscal 2026 goal, making Rangan's forecast appear quite achievable.

How Salesforce is going to do it

Over Salesforce's lengthy history, it has accumulated an impressive client list. Being a trusted and entrenched part of each customer's business, it's in a prime position to sell additional software and services. As such, the company has had spectacular success acquiring companies with complementary services and selling them to its customer list.

Rangan noted in his analysis, "We highlight Salesforce being able to drive innovation and growth through its acquired assets." He's referring to acquisitions like Salesforce's purchase of ExactTarget in 2013 when the latter had just $286 million in annualized revenue. Since the purchase, Salesforce has increased revenue from ExactTarget to $3 billion.

Salesforce later took over MuleSoft in 2018 when the latter had $284 million in revenue. Since then, revenue has grown to $1.7 billion. Going forward, the company is in a position to keep growing the acquired companies and reap the profits of scaling these businesses.

The most significant opportunity for Salesforce is perhaps its latest and largest deals. The company bought Tableau in 2019 and Slack Technologies in 2021. Revenue at those two companies has already grown, and they could drive the next leg of future operating profits for Salesforce.

Should you buy Salesforce now or wait?

Yes, we're in a bear market, and things could get worse before they get better. But it will get better. For instance, there have been 22 bear markets since 1928, and with the exception of the current one, they all have one thing in common -- they gave way to bull markets. This one will too.

Bear markets allow steadfast, savvy investors the chance to buy the beaten-down shares of great companies like Salesforce. Its adjusted earnings per share guidance for the current fiscal year is $4.72 (at the midpoint). That implies a forward price-to-earnings ratio of 31.5, down significantly from its five-year average of more than 47.

If you previously missed Salesforce during its incredible run, the bear market is now giving you another chance. You may regret not adding shares to your portfolio before the market recovery.