Both Amazon (AMZN -1.71%) and Costco (COST 0.08%) market themselves as low-cost shopping options for consumers. That's certainly true, but those deals come with a cost.

Joining Amazon Prime, which gets you unlimited free shipping (usually one-day, sometimes two-day), costs $119 per year, or $12.99 per month. Becoming a Costco member costs either $60 for a basic membership or $120 for an Executive membership that gets you 2% cash back (up to $1,000 per year) on most purchases.

Both companies have strong offers, but does it make sense for consumers to pay for both? The answer is somewhat complicated, and it's not the same for everyone.

An Amazon Prime truck stopped in a large parking lot

Amazon has increased its shipping speed and offers some same-day delivery. Image source: Getty Images.

Which is best for you?

A warehouse club, Costco offers bulk purchases. That means you generally have to buy fairly large quantities, and that requires having the space to store those items. Yes, you save money. Costco is generally cheaper than Amazon, according to a study by The Krazy Koupon Lady, but to get those savings, you have to make fairly large purchases.

Buying in bulk puts you at the risk of wasting some of your purchase. So, before you consider joining Costco, think about how you use the items you'd buy, and look at expiration dates. It's great to save on batteries, cereal, or shampoo, but those savings are lost if you don't use what you buy before it goes bad.

Costco does, however, have a few edges over Amazon. The first -- and one the online retailer can't easily equal -- is that it has gas stations at many of its locations. In some cases, joining Costco can be justified just by how much you will save filling up at the chain's gas stations.

The warehouse club also has an edge in that its brick-and-mortar locations offer immediate gratification. If you want orange juice, you don't have to wait overnight, or even two hours for delivery. You can walk in, buy it, and drink it as you leave the store.

You could argue that this is a dwindling advantage. Amazon has stepped up its delivery game: It now offers one-day shipping on plenty of items, and it delivers groceries through Whole Foods (which is more expensive than Costco) and its Amazon Fresh brand on a same-day basis in much of the country.

Delivery and selection are generally edges for Amazon. You will pay a little more on comparable items compared to Costco, but the selection is tremendous, and next-day delivery (even on Sundays) is very convenient.

Should you join both Amazon and Costco?

If simply saving money is your goal, then Costco makes the most sense. Shopping there requires planning, organization, and sometimes being willing to accept not getting exactly what you want.

Amazon offers a broader shopping experience at prices that are still a very good value. You can buy one roll of paper towels or a month's supply of Tide pods from the online retailer instead of being required to buy in bulk. You can also get the brand you want in a variety of sizes from Amazon.

Paying for Prime makes sense for people who shop reflexively. If you like to order things as you notice you need them, without having to think about quantities or expiration dates, then Amazon is likely for you. You will, of course, have to wait about a day to get your item, but that's not an issue for most purchases.

Many people might be a mix of the two types of shoppers described above. Perhaps you want to pay the lowest prices, but only when you can get exactly what you want. You may also simply not have the space to store lots of bulky items for use six months from now.

Avid shoppers who lack discipline would likely benefit from joining both Costco and Amazon. If you have to pick one, Amazon's selection probably makes it the best choice, but shopping smartly at either retailer likely saves the average family enough money to justify joining both.