For some food shopping, warehouse clubs offer low-cost alternatives to supermarkets. Using our market basket of 150 grocery items, we surveyed prices for Costco and Sam’s Club and compared them to Walmart, Target, and traditional supermarkets.

The warehouse clubs carried few if any of the 150 items in our market basket in the usual sizes. But when we looked for the same brands regardless of size, warehouse stores—which specialize in bulk sales—stocked a larger portion of our market basket items. Costco had 43 percent and Sam’s Club 63 percent.

The figure below indicates how much warehouse stores could save you. Since the warehouse stores stocked so few items in the sizes of our basic market basket, we looked for items of any size from the same brands. We then used unit prices (for example, price per pound) to calculate the warehouse stores’ prices for amounts specified in the market basket. Then we compared the prices of items at the warehouse stores with prices for the same brands at several other stores. This is not an apples-to-apples comparison—the sizes of the items priced at the warehouse stores were usually larger than the sizes of the items priced at the other stores—so the warehouse stores enjoy an advantage in such a comparison.

Become a Smarter Consumer Get free, expert advice delivered to your inbox every Wednesday when you sign up for the Weekly Checklist newsletter.

The two warehouse chains offer most shoppers about the same savings. Costco’s prices were about 35 percent lower than Cub; Sam’s Club’s prices were 34 percent lower. And compared to Walmart, the savings were about 17 percent at Costco and 15 percent at Sam’s Club.

In addition to having low prices, Costco received very high customer ratings for the quality of its meat and better-than-average ratings for produce quality and overall quality. (Sam’s Club’s ratings were considerably lower than Costco’s.)

While the warehouse clubs offered significant savings compared to prices offered at grocery stores, that might not justify paying their annual membership fees if you don’t visit often. For example, Costco’s prices were about 15 percent lower than Walmart’s; you’d have to spend $433 at Costco on products you could buy at Walmart before breaking even on Costco’s $65 annual fee.

And if half of what you buy is wasted due to spoilage, you won’t save by buying in bulk.