Amazon (AMZN -2.56%) and Costco (COST -0.24%) are competing to be the No. 1 destination for shoppers worldwide. Despite the stark contrast in their locations -- Costco relies more on brick and mortar locations, and Amazon makes the vast majority of its sales online -- the two are competing for a larger share of consumers' wallets.

One strategy each has implemented in their quest to serve their customers is an annual membership. Let's consider both memberships, which is worth more for its company, and why investors should take note.

A person with both hands up and a disgruntled expression, trying to weigh two options.

Amazon passed the "200 million Prime members" milestone. Image source: Getty Images.

Amazon Prime

Amazon Prime members get fast and free delivery on millions of items from Amazon.com, with no minimum purchase required. In fact, free next-day delivery is available on 10 million items. No other retailer comes close to matching that speed and item availability. The benefits are great for consumers -- you can order an item that costs $5 and get it delivered as early as the next day for free.

As you can imagine, selling an item for $5 and offering free shipping can often be an unprofitable transaction for Amazon. The company maintains this practice in part to make the customer experience unmatchable. Amazon recoups some of the costs from these money-losing transactions from the annual or monthly membership fees of $119 or $12.99, respectively.

Still, shipping costs for Amazon totaled $67.3 billion in the last four quarters. Meanwhile, subscription services revenue -- which includes revenue from Amazon Prime membership fees, among other things -- totaled $27.2 billion in the last four quarters.

In addition to fast and free shipping, Amazon has its own streaming service, Prime Video, that Prime members get access to as part of their subscription; this costs the company billions of dollars more in content spending.

From a consumer's standpoint, Amazon Prime is a great value. That's probably why Amazon has signed up 200 million Prime members. But from Amazon's point of view, it's a money-losing proposition.

A family in a parking lot with a shopping cart full of groceries.

Costco boasts 60 million paying households. Image source: Getty Images.

Costco's Gold and Executive memberships

Costco's business is different in some ways from Amazon. One of Costco's biggest differences is that it doesn't allow anyone without a membership to shop at its warehouses. In other words, to get into a Costco warehouse store, you need to show your membership card, or you'll be turned away.

Costco has two membership tiers: Gold and Executive, which are priced at $60 and $120 annually. The Gold membership gets you access to Costco's warehouse and to its discounted gas stations. The Executive comes with 2% cash back on all purchases during your membership period; if you spend $6,000 over the year, you essentially earn back your membership fee.

Customers are willing to pay this premium to get access to Costco's stores because of its famously competitive prices. The company is an excellent merchandiser that uses its purchasing power to deliver vast quantities of items at great prices to consumers. Indeed, the retailer has attracted 60 million paying households. And despite offering great prices to consumers, Costco still earns a profit on its sales.

Profit is what makes the difference in this comparison. Costco's membership provides the company with gross profit margins of nearly 100%. Amazon, in contrast, is losing money on its Prime program in the hopes of making it up by achieving large scale.

Therefore, Costco's membership program is likely more valuable to Costco's business than Amazon Prime is to Amazon. As investors follow each company's reported increases in membership totals, those figures should mean more for Costco's bottom line than they do for Amazon. In other words, a 1% increase in member totals for Costco could improve its value more than a 1% increase in member totals would for Amazon.