The best companies have durable competitive advantages. They're hard to disrupt, in other words. While the price you pay certainty matters, investing in companies with a clear and persistent edge will give you a good chance of beating the market over the long run.

Two companies that are truly special are Walt Disney (DIS 0.89%) and Costco (COST 0.56%).

Walt Disney

There's no question that Disney is going through a bit of a rough patch. An abrupt management change last November put former CEO Bob Iger back at the helm. Iger is tasked with turning the company around and restoring its profitability.

The biggest problem for Disney is its streaming business. The company launched Disney+ in late 2019, perfect timing to enjoy the pandemic-era boom in demand for all things streaming. Disney+ quickly racked up subscribers, but low pricing and excessive content costs pushed the whole direct-to-consumer business deep into the red.

In the fiscal year ending on Oct. 1, 2022, Disney's direct-to-consumer business produced a $4 billion operating loss. That wiped out half of the total operating profit within the larger media and entertainment segment. Disney has over 200 million paying subscribers across all its streaming services, but costs are out of control.

What makes Disney a special company, and what grants it a durable competitive advantage, is its ability to leverage its intellectual property, brands, and characters across all of its businesses. Successful movies can be turned into attractions at one of its resorts, spawn shows for the streaming services, and generate additional revenue through merchandise sales. All parts of the Disney empire ultimately feed into each other, creating a virtuous cycle.

The streaming business has the potential to be a huge source of profits. Disney has already enacted a significant price increase for Disney+, and it appears that subscribers have been more than happy to stick with the service. The company has also been testing a deeper integration with the merchandise business, presenting Disney+ subscribers with offers directly through the app.

Disney's profits are down, and the stock has tumbled about 50% from its peak in 2021. But the company has the potential to become far more profitable in the years ahead as it leans on its strengths to turn streaming into a cash cow.

Costco

Warehouse club Costco has done an incredible job convincing consumers that they can save a bundle by shopping in its cavernous stores. The company's members dole out $4.3 billion in membership fees like clockwork each year. Costco now has 68.1 million households and 128 million total cardholders who shop at its 848 warehouse clubs around the world, with a renewal rate in the U.S. and Canada of 92.6%.

Those membership fees are the key to Costco's profitability. The company managed a gross margin of just 10.5% in 2022, but that's by design. Consistently unbeatable prices are what keep members coming back and renewing year after year. Membership fees accounted for more than half of Costco's operating income last year.

This intense customer loyalty gives Costco a durable competitive advantage. During tough economic times, the company has a strong pitch: the lowest prices you'll find anywhere. Costco isn't fully recession proof, but its results should hold up well regardless of the economic climate.

It should be noted that Costco is a pricey stock. With analysts expecting earnings per share of $14.48 in fiscal 2023, the stock trades at a price-to-earnings ratio of 34. That valuation may be tough to swallow, but given the company's track record, the stability granted by its loyal base of members, and its resiliency in any economic environment, that high price could be worth paying for long-term investors.

In the world of retail, Costco is a beacon of stability. The company isn't going to be disrupted anytime soon. Even as e-commerce sales boom and consumers shift spending online, Costco is one store that consumers are happy to visit. That gives Costco a huge edge, and the retailer should continue to thrive for years to come.