If you feel like you’re getting crushed by ATM fees, well, that’s because you are. According to research published in the Wall Street Journal, the financial data provider Bankrate found that the average fee for using a non-network ATM has risen to a record $4.52, an increase of more than 21 percent over the past five years.

In Atlanta and New York, fees for using an ATM exceed $5, and in three other cities -- Phoenix, Miami and Milwaukee -- customers have to cough up more than $4.75 to withdraw cash. Greg McBride, a senior financial analyst at Bankrate, said withdrawing money from an ATM that doesn’t belong to your bank is “a sloppy financial habit that can put you in the poorhouse.”

The rise in fees can be attributed to two components. The first is that banks are casting about for ways to get more money out of their customers. Updated regulations began chipping away at the fees banks take in from charges like overdrafts in 2009, the first year that banks’ revenues from fees declined. Prior to 2009, the amount of money U.S. banks earned from customer fees had risen every single year since 1942, when the Federal Deposit Insurance Corp. began recording it.

The total revenue U.S. banks earned from customer fees, including ATM fees, has fallen more than 18 percent since then, according to the FDIC. In 2014, American banks pulled in $34.1 billion in fees, compared with $41.7 billion in 2009.

The other reason is that consumers are using ATMs much less frequently than they once did. In its report, the Journal cited research from the consulting firm Oliver Wyman that found debit card ATM withdrawals are down 41 percent over the past decade.

That’s been driven partly by the rise of services like Square, which says it processed over $30 billion worth of payments in 2014, and mobile payment solutions like Apple Pay. According to a survey conducted by Accenture, 41 percent of American consumers had used their mobile phones to pay for something at a merchant location in 2014, up from 18 percent the previous year.

That shift in consumer behavior has to be troubling both for banks and other independent ATM owners. There are 425,000 ATMs in the United States, and more than half of them -- 52 percent -- are owned by independent businesses, according to the National ATM Council, a trade group.

“Someone has to pay to maintain these ATM networks,” Bankrate’s McBride said. “That burden is falling on the noncustomers.”