A company may split its stock after a significant increase in share price. Doing so makes the stock cheaper and, therefore, accessible to more investors. But splits can also spotlight stocks worth owning because lasting share price appreciation rarely occurs without a strong financial foundation.

In that respect, the stock split itself is irrelevant. What actually matters is the substantial and sustained increase in share price.

Building on that, Microsoft (MSFT 1.82%) and HubSpot (HUBS -0.78%) essentially tripled in value over the last five years -- and both companies are now stock-split candidates. But the stocks could be rewarding long-term investments even if that doesn't happen.

1. Microsoft

Microsoft beat expectations on the top and bottom lines in the fiscal fourth quarter (ended June 30). Revenue increased 8% to $56.2 billion on modest growth in the productivity and business processes segment (enterprise software products) and strong growth in the intelligent cloud segment (server products and Azure cloud services). But GAAP net income soared 20% to $20.1 billion as Microsoft showed excellent cost control amid a challenging macroeconomic environment.

The investment thesis is simple: Microsoft is the leader in enterprise software-as-a-service (SaaS), with nearly twice as much market share as the next competitor, and the brand authority it has garnered in that space has been a tailwind for its cloud computing business. Indeed, Microsoft Azure is the second-largest provider of cloud infrastructure and platform services, and its market share has increased more than 200 basis points in the last two years.

Those share gains reflect strength in several cloud service verticals, including hybrid computing, artificial intelligence (AI) developer services, and AI supercomputing infrastructure. Microsoft aims to maintain its momentum in the cloud by leaning into the growing demand for AI. Its exclusive partnership with OpenAI means Azure is the only cloud through which developers can access the GPT large language models (the AI models that power ChatGPT).

Microsoft itself is using those models to build Copilot products for Microsoft 365 and Dynamics 365. The former is a generative AI assistant that can draft text in Word, create presentations in PowerPoint, and analyze data in Excel. The latter is a generative AI assistant that can automate workflows across sales, marketing, finance, and supply chain management.

Here's the bottom line: The enterprise SaaS and cloud computing markets are expected to grow at 14% annually through 2030, and the AI market is expected to grow at 37% annually over the same period. So investors can conservatively expect low-double-digit revenue growth from Microsoft through the end of the decade.

Indeed, Morgan Stanley sees Microsoft as the software company best positioned to monetize generative AI, and analysts at the investment bank are forecasting annual revenue growth in the mid-teens through 2025. In that context, its current valuation of 11.5 times appears relatively fair. Risk-averse investors should wait for a pullback, but risk-tolerant investors can buy a very small position in this AI stock today.

2. HubSpot

HubSpot looked strong in the second quarter in spite of macroeconomic uncertainty. Its customer count climbed 23% to 184,924 and the average subscription revenue per customer ticked 2% higher. In turn, second-quarter revenue increased 25% to $529 million and non-GAAP net income skyrocketed 212% to $70 million. The company is well positioned to maintain a similar growth trajectory in the coming years.

HubSpot ranks as the best global software company in any software category, according to peer-review-based research firm G2. That commendation reflects high user satisfaction scores and a strong presence in several software verticals. Indeed, HubSpot is the market leader in marketing automation software and AI sales assistant software for small businesses, and the company is quickly gaining share in the broader customer relationship management (CRM) market.

HubSpot sees its market opportunity rising to $77 billion by 2028, leaving a long runway for future growth, and the company is leaning into AI to capitalize on that opportunity. HubSpot recently announced a suite of AI products and features that can surface insights and automate workflows across its CRM platform. For instance, AI Assistant can write blogs, build webpages, and create marketing content; and Chatspot.ai is a natural language interface that allows users to engage with the platform more easily.

Looking ahead, investors can expect annual revenue growth in the low-20% range as HubSpot continues to diversify beyond marketing and lean into its AI-centric product roadmap. Indeed, Morgan Stanley is forecasting revenue growth of 23% annually over the next five years, and Morningstar is forecasting revenue growth of 21% annually over the same period. In either case, its current valuation of 10.8 times sales looks downright cheap, especially when the three-year average is 17.1 times sales. Investors should feel good about buying a small position in this growth stock today.