Costco (NASDAQ:COST) may be your least expensive option when it comes to shopping. In fact, two recent studies show that across a range of basic items and household essentials, Costco offers better prices than Amazon (NASDAQ:AMZN).

The results aren't dramatic -- one of the surveys showed buying a set of staples items at Amazon would cost $329.43, whereas the same purchase at Costco would be $313.14 -- but they did show the warehouse club as the winner. Of course, it costs either $60 or $120 a year, depending upon what membership you buy to shop at Costco.

That expense can absolutely be offset by savings -- specifically if you opt for the $120 executive membership, which offers 2% cash back on eligible purchases. It's even possible with either membership to earn back the cost of joining just during the holiday season.

The exterior of a Costco with a crowded parking lot.

Costco charges an annual fee to shop in its warehouses. Image source: Costco.

How can you earn your joining fee back?

Any Costco shopper should visit the chain remembering that just because it's generally one of the cheaper, if not the cheapest places to shop, that does not mean it always has the best price on every item. That's especially true for big-ticket items like electronics. When making a large purchase at the warehouse club, or from any retailer, it's always important to do some price comparison to make sure you're getting the deal you think you are.

For regular, $60 Gold Star members, the fastest way to earn your joining fee back is to make big purchases. If you save 10% on a $600 television purchase, you're already there. Of course, finding that big of a savings compared to Amazon or other lower-priced retailers in one shot can be hard. It is possible, however, on some big-ticket items, and through Costco's well-priced travel-booking system or even its car-buying service.

Go big (then go home)

For many consumers, especially those with big holiday budgets, the best path to earning back your joining fee may be an executive membership. Yes, it's harder to earn back $120 than $60, but getting 2% back on nearly everything you buy adds up quickly. And, if you really want to make your $120 back in the fastest way possible, get the warehouse club's Costco Anywhere Visa® card from Citi, which adds an extra 2% cash back on purchases.

Once you have an executive membership and perhaps the rewards card, your path to covering your signup fee becomes simple math. If you just have the $120 membership, you save $2 for every $100 spent. Add in the credit card and that number rises to $4 per $100 spent.

At the first rate, you would need to spend $6,000 to earn back your $120 membership fee purely from the cash-back reward. That number gets cut to $3,000 if you have the credit card, but in both cases, those numbers reflect only the cash back and not any savings.

Even if you assume that your overall savings on your purchases will be 2% versus shopping at Amazon or Wal-Mart, then the spending-to-payback rate decreases further. That means someone without the credit card only needs to hit the $3,000 spending mark, while someone with the rewards card then only has to spend $2,000.

Be careful

While it's possible to earn back your membership fees just during the holiday season, doing so only makes sense if you were planning to make the needed purchases anyway. The reality is that joining the warehouse club gives you a full year to make your money back, and for most people visiting a couple of times a month to save a little bit makes more sense than front-loading a bunch of purchases into November and December.

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. Daniel B. Kline has no position in any of the stocks mentioned. The Motley Fool owns shares of and recommends Amazon and Visa. The Motley Fool recommends Costco Wholesale. The Motley Fool has a disclosure policy.