A customer uses an ATM machine in Pittsburgh. (Gene J. Puskar/AP)

The cost of convenience is rising.

Consumers who use any ATM outside of their banks’ to withdraw cash are now paying record high fees, based on a new survey from Bankrate.com. Banks now charge $4.52 on average for each transaction, up 21 percent from five years ago, according to the annual survey.

The burden varies by location, with the highest average ATM fee of $5.15 being charged in Atlanta. The lowest average ATM fee, at $3.85, is in San Francisco.

Thanks in part to growing ATM networks, fewer people are being hit by out-of-network fees as they get smarter about where they withdraw cash, says Greg McBride, chief financial analyst for Bankrate.com. But that’s also what is pushing some banks to increase their fees as they look to make up for lost revenue, he says.

Rising fees are a reminder that it pays to find a checking account that matches your habits. People who are constantly withdrawing cash may need to switch to a bank that has more ATM locations in their area.

The Bankrate survey also noted that it’s become much harder overall to find a free checking account. Only 37 percent of checking accounts are free, compared with 76 percent of accounts in 2009, which was the peak.

An additional 58 percent of checking accounts are only free for people who meet usage requirements, such as setting up direct deposit or using their debit cards a certain amount of time each month. Those who don’t make the cut need to pay a monthly fee, which grew to $5.86, up 11 percent from last year, according to Bankrate.

Read more:

New rules will protect home buyers from last-minute surprises

Get ready to dip, not swipe, your credit cards

Fifth Third Bank fined for discriminating against minorities seeking auto loans

Checking accounts that pay 5% are a real thing. They're just harder to find! #savingstip

A post shared by Get There (@gettherewp) on