For Costco (NASDAQ:COST), success or failure comes down to driving membership sales. Since the chain makes about 75% of its profit from membership fees, it can afford to price its merchandise and services below rival retailers. That's a huge advantage that drives traffic to its stores while reinforcing the value of being a member.

If a customer regularly buys an item from the retailer, whether it's breakfast cereal, aspirin, single-serve coffee pods, or even something needed less often like a hearing aid, car tires, or eyeglasses, they become more likely to renew their membership.

The biggest driver of that loyalty may be Costco's gas stations, where the chain prices its gasoline dramatically cheaper than its direct competition. In fact, according to new research from CSP Daily News, which partnered with Oil Price Information Service (OPIS), Costco not only has cheaper gas than stations it directly competes with, but it's also less expensive than other warehouse club chains. Low gas prices are a major part of the fuel that powers Costco's engine and likely a key factor in both attracting members and keeping people renewing their memberships.

A gas pump is inserted into a car

Costco offers cheaper gas than its rivals. Image source: Getty Images.

How much cheaper is Costco?

OPIS uses the term "price differential" to show how gas at a brand's typical store is priced relative to its direct competition, according to CSP. That differential is then measured in cents per gallon (CPG) and the three major warehouse clubs -- Costco, Wal-Mart's (NYSE:WMT) Sam's Club, and BJ's -- ranked Nos. 1, 3, and 4, respectively, in terms of having the biggest price differential.

BJ's came in fourth place on CSP's Fuels 50: 10 Low-Price Leaders list, scoring a 10.91 CPG price differential while Sam's Club took second place at 11.47 CPG. Costco blew its two rivals out of the water, delivering a 20.88 CPG differential, a large enough difference that consumers likely notice and it may be the deciding factor to go with one chain over the other.

OPIS Global Head of Energy Analysis Tom Kloza explained that Costco has "the greatest ability to buy cheap and smart." He added that the company's 500 gas stations made over $9 billion in 2016 fuel sales in 2016.

"We all know if there was a market-efficiency rating for Costco, it would be off the charts," Kloza was quoted as saying. "Fuel serves as a lure to sell memberships, where the real money is made. Gas is the magic elixir for that company. It really props up the frequency -- and for Costco, it's all about the frequency."

Why is frequency important?

The more a shopper visits Costco (or any other warehouse club), the more likely he or she is to see value in being a member. Gas is a recurring purchase that brings people to Costco and once they are there, in at least some cases, a member will park, enter the store, and make other purchases.

Costco has made a strategic decision to use gasoline as a lure, a perk designed to attract and retain members. It's doing so more aggressively than even BJ's or Sam's Club -- a smart decision since consumers cannot gas up their cars on the internet. Cheap gas on its own likely keeps some people renewing their membership year after year while it's an important piece of the puzzle for others.

Daniel Kline has no position in any stocks mentioned. The Motley Fool owns shares of and recommends Costco Wholesale. The Motley Fool has a disclosure policy.