The S&P 500 is off just 7% from a record high, putting the benchmark index on the brink of bull market territory. That threshold is noteworthy because the S&P 500 returned an average of 285% during the last five bull markets, according to Yardeni Research, and many stocks will undoubtedly climb much higher during the next one.

With that in mind, artificial intelligence (AI) has been making waves from Main Street to Wall Street, and it will likely be a key growth driver during the next bull market. Indeed, Precedence Research expects AI software sales to increase by 23% annually to reach $1.1 trillion by 2032.

Here are two remarkable AI growth stocks to buy now and hold long-term.

1. HubSpot

HubSpot (HUBS -0.78%) is a case study on the power of internal development and continuous innovation. What started as a single marketing application has evolved into a full customer relationship management (CRM) suite. Its platform now includes productivity software for sales, service, marketing, and operations teams, as well as solutions for content management and commerce. Those tools help businesses delight customers at every interaction.

Salesforce is the undisputed leader in the broader CRM industry, but HubSpot is a CRM leader among small businesses. That achievement was made possible by freemium pricing and a build-over-buy mentality. To clarify, Salesforce stitched together its CRM platform by leaning heavily on acquisitions, but HubSpot relied on internal innovation to create a suite of seamlessly integrated and easy-to-use software.

HubSpot looked solid in the third quarter despite ongoing macroeconomic challenges. Its customer count increased 23% year over year to 184,900, and the average subscription revenue per customer ticked 2% higher. In turn, revenue climbed 25% year over year to $529 million, and non-GAAP (adjusted) earnings rocketed 205% to $1.34 per diluted share. Investors have good reason to believe that momentum will continue.

HubSpot is a recognized market leader in artificial intelligence (AI) sales assistant software, but the company recently announced a wave of new AI products that will automate workflows across its CRM platform. That includes generative AI tools that can create marketing campaigns, social media content, and entire websites in response to natural language prompts. Those products will reach general availability next year, but Brad Sills from Bank of America has already designated HubSpot a top pick among AI stocks.

With that in mind, HubSpot values its addressable market at $77 billion by 2028, leaving plenty of upside for investors. And with shares trading at 13.5 times sales, a discount to the three-year average of 17.3 times sales, now is a good time to buy a small position in this growth stock.

2. Arista Networks

Arista Networks (ANET -0.02%) provides high-speed networking equipment and software for cloud and enterprise data centers. Its switching and routing platforms offer industry-leading performance, a noteworthy quality, given that AI software and other trendy technologies demand tremendous bandwidth. Arista supplements its hardware with adjacent software for network automation, monitoring, and security. But the company says its greatest innovation is the Extensible Operating System (EOS).

EOS is a single piece of software that runs across every piece of Arista hardware in every environment, allowing clients to deploy a seamless network that connects public clouds, private data centers, and enterprise campus workspaces. That single-product approach separates Arista from legacy vendors that use multiple operating systems, a strategy that makes network management more complex and costly.

Cisco Systems used to dominate the data center switching market, but Arista is now the gold standard in high-speed data center switches, and its leadership position is widening. Arista captured a 47% market share in the first quarter of 2023, up from 36% in the same period last year, while Cisco saw its market share slip about 300 basis points to 21%.

Not surprisingly, Arista delivered a solid second-quarter financial report. Revenue climbed 39% year over year to $1.5 billion and generally accepted accounting principles (GAAP) net income soared 65% to $1.55 per diluted share. As a caveat, hardware sales tend to be cyclical, meaning they ebb and flow over time. Arista is undoubtedly in a boom period right now, but investors have good cause to think the boom will continue.

Morgan Stanley analysts say AI workloads will drive cloud networking spending higher by 16% annually over the next four years, and the firm believes Arista is the company best positioned to benefit from that tailwind. But AI is one of several catalysts driving demand for faster data center networks -- others include cloud computing, streaming media, and 5G applications -- and Arista is in a good spot to benefit in all cases, given its strong market presence.

Shares currently trade at 36.2 times earnings. That is not a cheap valuation by any stretch of the imagination, but it falls in line with the three-year average, so investors should feel comfortable buying a very small position in this growth stock today. If shares pull back sharply in the future, consider buying more.