Costco Wholesale (COST 1.01%) and Amazon (AMZN 3.43%) may not be the most direct competitors.

Costco, after all, focuses on buy-in-bulk bargain-priced goods in its warehouse stores, while Amazon is best known as the "everything store," stocking millions of items online for easy delivery.

As they have grown, however, the two companies are increasingly fighting for the same customer. Amazon has spent years trying to elbow its way into the grocery space with its acquisition of Whole Foods, its opening of Fresh grocery stores, and a range of efforts online to become its customers' first stop to fill up their pantry.

Costco, meanwhile, has stepped up its efforts to tap into the massive e-commerce market, partnering with Instacart to handle same-day deliveries for groceries and recently revamping its app to make a range of improvements, as CFO Richard Galanti discussed on the recent earnings call.

Now, Costco and Amazon could be going toe-to-toe in a new massive market: healthcare.

For several years now, Amazon has been searching for a beachhead in the multitrillion-dollar healthcare industry. It acquired online pharmacy Pillpack, a move that sent brick-and-mortar pharmacy stocks tumbling. It partnered with Berkshire Hathaway and JPMorgan Chase on a program to improve the health insurance system, naming it Haven, before disbanding it. 

The company has also targeted virtual healthcare, launching Amazon Care, which it later closed, and acquiring One Medical for $3.9 billion instead.

Costco, meanwhile, has long offered ancillary health services like pharmacy, optical including optometry, and hearing aids, but the company just made a move that could significantly expand its healthcare presence.

A parking lot outside of a Costco.

Image source: Costco.

What Costco is doing

Earlier this week, Costco announced a new program with Sesame, a healthcare marketplace that covers both in-person and virtual care and doesn't accept health insurance, therefore keeping prices low.

According to the new partnership between the two companies, Costco members will receive Sesame's best pricing on a variety of services, including virtual primary care for $29, health checkups, including a standard lab panel and a follow-up consultation for $72, and online mental health therapy for $79. Additionally, Costco members will get 10% off of Sesame's other services, including in-person visits.

Those prices are significantly better than what Amazon announced back in August when it expanded its Amazon Clinic, its own virtual healthcare marketplace. Amazon said that the average price for a message-based consultation would be $35, and video visits would cost $75. The $29 fee for Costco members through Sesame covers video visits. 

Why Costco could have the edge over Amazon here

Amazon has been angling for a piece of the healthcare space for years, though its attempts have run into several speed bumps, including the failure of the Haven joint venture and its shuttering of Amazon care. The company also laid off 80 employees in its pharmacy unit in July.

Its $3.9 billion acquisition of One Medical, which was unprofitable, constitutes an expensive decision to buy its way into primary care rather than build it. 

Costco, on the other hand, tends to stick with its strengths. The terms of the deal with Sesame weren't disclosed, but it looks like a win-win for both companies as it will help lift Sesame's exposure and give Costco members an attractive new benefit.

In the healthcare battle, Costco also has another valuable advantage over Amazon: its stores. Virtual healthcare has its limits, after all, and Costco can devote more store space to healthcare as it sees fit, and the company already has experience with this, providing pharmacy and optical services. 

Additionally, the stores act as an excellent marketing vehicle for selling customers new items or services or informing them of new benefits, like the Sesame partnership. 

It's unclear what Costco's long-term strategy is in healthcare, and the company didn't comment on the Sesame partnership, though more retailers are looking to add healthcare services to their stores.

Costco has avoided the pitfalls that have thus far befuddled Amazon in the healthcare industry, and it has the customer trust and real estate to allow it to grow its position in healthcare, be it through its or virtually as it's doing with Sesame.

With lower prices than Amazon Clinic and no need for a multibillion-dollar acquisition, Costco may have just gained a significant advantage over a top rival.