It takes more than a portfolio of well-chosen stocks to make money in the market. Investors must also learn to focus on the big picture. Countless variables impact stock prices over short periods of time, but companies that consistently post strong financial results tend to generate market-beating returns for patient shareholders in the long run.

Microsoft (MSFT -0.61%) and Costco Wholesale (COST -0.94%) are excellent examples. Both companies have grown sales and profits like clockwork in recent years, and both stocks have crushed the S&P 500 over the last decade. More importantly, Microsoft and Costco benefit from certain competitive advantages that should keep them near the forefront of their industries for years to come.

All this means both growth stocks are worth buying today. Here's what you should know.

1. Microsoft: The productivity engine of the modern enterprise

In a way, Microsoft is the foundation on which tens of thousands of enterprises are built. Its expansive product portfolio meets a wide variety of business needs, and its brand name carries weight in many different markets.

For instance, Microsoft 365 -- which brings together Office 365 software, the Windows operating system, and cybersecurity solutions -- is the most popular enterprise application suite of any kind. Similarly, Microsoft Teams -- which brings together tools for video, voice, and chat -- is the leading cloud communications platform, according to research company Gartner.

Microsoft also provides enterprise resource planning tools and customer relationship management software through Dynamics 365, a platform that help businesses manage finances, optimize supply chains, and drive productivity across departments like marketing, sales, and customer service. Additionally, the company offers a multitude of cloud infrastructure and platform services through Microsoft Azure, the second-most popular public cloud behind Amazon Web Services.

Not surprisingly, Microsoft's collection of mission-critical products has regularly translated into solid financial results. Over the past year, revenue soared 18% to $198.3 billion, and earnings climbed 20% to $9.64 per diluted share. But investors have good reason to believe Microsoft can maintain that momentum for years.

Software products for like Microsoft 365 and Dynamics 365 should continue to drive growth as enterprises invest in digital transformation, but the most exciting growth opportunities lie in cloud computing and digital advertising.

Cloud spend is expected to grow at 16% annually to reach $1.6 trillion by 2030, according to Grand View Research, and Microsoft Azure has steadily gained market share over the past few years. Likewise, Netflix recently selected Microsoft as its sales and technology partner for its ad-supported streaming service, which may launch as early as this year. That could catapult Microsoft to the forefront of online video advertising, a market that Omdia believes will hit $259 billion by 2025.

Currently, shares trade at 26.51 times earnings, a slight discount compared to the three-year average of 32.3 times earnings. That's why this blue chip growth stock is a buy right now.

2. Costco Wholesale: The third-largest retailer in the world

Costco is the third-largest retailer in the world, and its membership program is more than 116 million cardholders strong. That success stems from its reputation for bargain prices across a wide variety of high-quality merchandise, from groceries and apparel to jewelry and appliances.

How does Costco manage that? Its warehouses (stores) carry only 4,000 stock keeping units (SKUs), far less than the 30,000 SKUs at the typical supermarket. That enhances the pricing power Costco derives from its scale by forcing suppliers to compete for very limited shelf space.

The company also develops certain products internally through its Kirkland Signature private label. That vertically integrated strategy allows the company to undercut the price of branded alternatives, often by 15% to 20%, while still earning higher margins.

On that note, in spite of the inflationary environment, Costco has delivered solid financial results over the past year. Revenue rose 17% to $217.5 billion, and earnings jumped 19% to $12.70 per diluted share.

Looking ahead, Costco is investing in several areas that should enhance its rapport with members and create value for shareholders. For instance, Costco Next is a program that allows members to buy directly from Costco suppliers. And Costco Logistics is a last-mile delivery service that allows the company ship items (especially big and bulky items) directly from its own inventory, rather than relying on vendor drop shipments. That lowers the cost of merchandise and expedites delivery times for members.

To summarize, Costco benefits from tremendous scale, brand authority, and operating expertise, and those advantages should keep the company on the leading edge of the retail industry for years to come.

As a caveat, shares currently trade at a pricey 41.17 times sales -- above the three-year average of 39.2 times sales. But given Costco's strong market position, I think it's worth buying a few shares of this stock today.