While some Costco (NASDAQ:COST) members shop at the warehouse club for the joy of discovery, or even the free samples, it's fair to say that most pay for a membership in order to save money.

The same can be said of Amazon (NASDAQ:AMZN) Prime members. In fact, the roughly 80 million Prime Members and just-over 88 million Costco cardholders globally are both almost certainly largely made up of people driven by the search for value.

One of the two companies does actually offer better prices, according to two recent reports. The difference may not be enough to get devoted fans of the second-place retailer to switch, but it's a surprisingly decisive win.

A Costco store

Costco and Amazon are competitors that co-exist surprisingly well. Image source: Costco.

Which retailer is cheaper?

BMO Capital Markets analysts Kelly Bania and David Lantz recently completed a price study comparing shopping in-store at Costco, Costco.com, and Amazon, Barron's reported. The two looked at a basket of 54 items and found that shopping in a Costco was the best deal while Costco.com still beat Amazon, but not by as much.

That matches the results of a similar study done by SFGate.com. The website compared shopping at a Costco warehouse to buying from Amazon examining a range of essentials and basic items including toilet paper, party snacks, and some basic pharmacy purchases including Advil.

"The bottom line? Costco is cheaper nearly across the board (but not by a ton)." The results from SFGate concluded that buying the staple items at Amazon would set you back $329.43, whereas the same purchase at Costco would be $313.14.  

It's not just about which is cheaper

Amazon and Costco have a lot of overlap in members because both appeal to consumers looking to save money. Recent research from GfK first reported on by eMarketer, showed that the people willing to pay Amazon $99 a year for Prime's free shipping (and other perks) join warehouse clubs including Costco in higher numbers than non-members.

That backs up an October report from Morgan Stanley covered by The Seattle Times. The financial firm surveyed 2,700 people and found that nearly half (45%) of Costco members also had an Amazon Prime membership.

"Members of both Costco and Prime have not and generally do not intend to spend more with one retailer/e-tailer at the expense of the other," according to the report, which noted brand loyalty being a boon to both.

Still, Costco is cheaper

While Costco and Amazon do not generally threaten each other's business, the warehouse club does have a clear edge in pricing, at least when it comes to staples. That's an advantage the chain has been working to press as it has been exploring ways to make it easier for consumers to pop into its stores.

Of course, Amazon sells tens of millions more items than Costco does. That protects its value to consumers who can justify paying for memberships to both, in order to save money.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.