A credit card that gives you cash back can put a dent in how much you spend on gas. But figuring out the right card to apply for can be complicated. Fees, waivers, rebate rules, bonuses, and other terms can make it difficult to figure out how much cash you actually get back.

Consumer Reports' Credit Card Adviser Comparison Tool can make the task easier. It calculates the costs and benefits of more than 50 cash-back credit cards and points you to the best deals, according to what you buy.

The average U.S. household spent $190 per month on fuel for the year ending in June 2015, according to the latest data from the U.S. Bureau of Labor Statistics. Plug that number into the Credit Card Adviser Comparison Tool, and you'll find that five gas credit cards will pay you back more than $300 in cash over the first three years that you use the card. (We look at the first three years because sign-up bonuses and fee waivers in the first year can skew cash-back results.)

Cash-back gas credit cards can help you save at the gas pump.
Photo: Jeff Blyskal

Topping the list, the PenFed Platinum Cash Rewards Plus Visa and USAA Cashback Rewards Plus American Express both paid back $342 (after considering associated fees) over the first three years of use. Both card issuers also scored highly in our Ratings of banks and credit unions

Other good gas credit cards are Bank of America's BankAmericard Cash Rewards, BankAmericard Cash Rewards for Students, and Pink Ribbon BankAmericard Cash Rewards cards. Each provided $326 in cash back after taking into account fees over the first three years of use.

Our calculations assume that the cardholder pays off the entire balance each month, because the finance charges that come with carrying a balance can wipe out any cash-back benefits.

If you get a credit card that provides exceptional cash back, be sure to use it strategically. "If a card is better for gasoline, use that card only for that purpose," says Brian Kelly, the founder and CEO of The Points Guy, a travel and credit card website that advises how to maximize rewards card benefits. 

All of the cash-back credit cards in our comparison database also pay benefits for other types of purchases. If you use your card to buy groceries, for example, you'll still get cash back, though the percentages might vary. 

To search through gas credit cards to find the best one for you, use the Credit Card Adviser Comparison Tool. Plug in the amount you spend for gasoline, restaurants, travel and groceries. You might be surprised by the credit cards that come back and how much you could save.

Keep in mind that some cards have been excluded from our comparison tool because they place restrictions on how you can receive the cash back. For example a cash-back card could give you 2 percent back but only if you accept it as a statement credit exclusively for travel purchases.