Amazon.com Inc. (AMZN) may be the king of e-commerce, but when it comes to the best prices and the speediest shipping, it's Costco Wholesale Corp. (COST) that takes the crown.

That’s according to BMO Capital Markets, which did a deep dive into pricing and shipping costs at Amazon, Costco and Wal-Mart Stores Inc. (WMT) and found that in the 16 categories analyst Kelly Bania and her team studied, the warehouse retailer had prices 7% lower than on Amazon's website. Shipping took an average of 4.5 days per each item compared to 5.5 at Amazon. Wal-Mart and its Jet.com owned e-commerce website had prices that were 18% higher than Amazon's and took a lot longer to ship with the average being 9.8 days.

When taking into account Amazon’s Prime membership program that offers discounts and free two-day shipping, BMO Capital Markets found Amazon prices were 4% lower than Wal-Mart when shipping wasn’t included and 10% cheaper when all of the fees were factored in, reported Barron’s, which covered the research report. (See also: Why Amazon Is Losing to JD.com and Wal-Mart.)

Not So Fast, Amazon

“With Costco generally beating Amazon in both price and shipping, it’s a reminder that Amazon has strong competition for all those musing about antitrust concerns, especially ones with a strong membership program like Costco's. And with Walmart investing heavily in eCommerce, we think it remains a vital competitor to watch, especially on price,” wrote Bania. “With that said, Amazon offers a wider set of SKUs​ than Costco does, and Prime has other benefits (video, music, etc.) that create differentiation.”

The analyst reiterated her outperform rating on Amazon and her $1,200 price target. The analyst rates Wal-Mart and Costco at market perform with price targets of $80 and $170, respectively. “Despite Costco's price gap to Amazon we believe near-term sentiment and fear of the long-term impact of Amazon on Costco's business (whether or not justified by near-term fundamentals) could continue to create an overhang on COST shares and limit valuation upside,” she wrote in the research note. (See also: Six Retail Stocks That Still Rule: Morgan Stanley.)

Aiming to remain relevant and lure customers its way, Wal-Mart has been making Amazon-esque moves lately. Take its recent partnership with Alphabet Inc.’s Google (GOOG). Starting in late September, Wal-Mart will make hundreds of thousands of items available for sale via voice using Google Assistant on their mobile phones, its Google Home voice-activated speaker and eventually other devices. Wal-Mart is sharing the purchase history of consumers with Google so that users can quickly reorder items.

Want to learn how to invest?

Get a free 10 week email series that will teach you how to start investing.

Delivered twice a week, straight to your inbox.