The S&P 500 index is widely viewed as a benchmark for the broader U.S. stock market. Despite falling sharply in 2022, the broad-based index has still increased 28% over the past three years. But HubSpot (HUBS 2.96%) and Arista Networks (ANET 2.33%) have more than doubled during that time period, and investors should expect both stocks to maintain that momentum in the coming years.

Here's why these growth stocks are worth buying today.

HubSpot is the second-best global software seller

HubSpot is a software company that specializes in customer relationship management (CRM). Its platform is designed to drive productivity across marketing, sales, customer service, and operations teams. HubSpot also provides a content management system that helps businesses build engaging websites and personalized web experiences. Its CRM software helps businesses attract leads, convert leads into customers, and maintain lasting relationships with those customers over time.

HubSpot faces immense competition from tech giants like Salesforce and Microsoft, but the company stands out for two reasons. First, its platform is engineered for small businesses, a segment of the CRM market that is underserved by larger competitors. Second, its freemium pricing consistently draws new customers to the platform, and HubSpot has proven adept at expanding its relationships with those customers over time.

For instance, HubSpot increased its customer count 24% to 158,905 in the third quarter, and the average subscription revenue per customer climbed 7% from the prior year. Fueled by that compounding dynamic, third-quarter revenue rose 31% to $444 million, and non-GAAP net income climbed 38% to $0.69 per diluted share.

Turning to the future, the company is well positioned to maintain its momentum. HubSpot ranks as the leading CRM vendor among small businesses, according to research company G2, and small businesses accounted for a sizable chunk of its $45 billion market opportunity in 2022. Better yet, management says its addressable market will grow at 10% annually to reach $72 billion by 2027, and HubSpot is developing new payment and commerce products that should create new revenue streams.

Also noteworthy: Based on market presence and user satisfaction scores, HubSpot ranked as the second-best global software company in any software category last year, according to G2. Only Microsoft received a higher ranking. That puts HubSpot in rarified air. And with shares trading at 10.6 times sales, a discount to the three-year average of 17.2 times sales, this growth stock is worth buying.

Arista Networks leads high-speed data center networking

Arista provides the high-speed networking platforms (like switching and routing solutions) that allow information to flow through modern data centers. The company pairs its core networking products with adjacent software for network telemetry, workflow automation, and security. Arista first brought its technology to cloud data centers, but it has since expanded across enterprise and campus environments.

Arista says its principal innovation is its Extensible Operating System (EOS), the software that powers its entire lineup of switching and routing platforms. By running a single operating system, Arista allows clients to integrate their IT environments -- from public clouds to private data centers, in both wired and wireless workspaces -- into a seamless network. That distinguishes the company from legacy vendors that use multiple operating systems, an approach that increases cost and complexity for clients.

Arista's networking products offer industry-leading capacity and low latency, meanings its switches and routers can move large amounts of data very quickly. That selling point has helped Arista win the business of cloud titans like Microsoft and Meta Platforms, and it has propelled the company to the forefront of the industry. Arista holds 41.5% market share in high-speed data center switches (like 100G, 200G, and 400G), which is nearly twice as much market share as the next closest competitor.

Arista provides the high-performance networking platforms needed to support cloud data centers, and it lowers the total cost of network ownership for customers by implementing a single operating system. That value proposition has fueled impressive financial results, even in a difficult economic environment. Third-quarter revenue climbed 57% to $1.2 billion, and GAAP net income soared 61% to $1.13 per diluted share.

Going forward, Arista should benefit from several tailwinds, including the ongoing adoption of cloud computing, 5G networks, and artificial intelligence applications, and the proliferation of Internet of Things devices. Those trends will put pressure on data center infrastructure, creating a need for faster networking solutions over time. With that in mind, Arista estimates its total addressable market will grow at 13% annually to reach $51 billion by 2027.

Currently, shares trade at a reasonable 10.5 times sales, slightly above its three-year average of 10.3 times sales. At that price, Arista is still well positioned to produce market-beating returns for patient shareholders.