It might seem counterintuitive — at first.

Financial institutions are charging record-high fees when you withdraw money at an ATM not affiliated with your bank at a time when the cash-dispensing machine’s future is in limbo as more of us opt to use other forms of payments.

“People can send money to each other [with apps]. They are paying with cards more. You have remote capture on your phone to do deposits,” says Peter Reville, director of primary research services at Mercator Advisory Service, a payments consulting firm. “So the need for an ATM is waning.”

While research also shows that we will do anything to dodge ATM fees, many of us still want cash on hand to buy stuff — especially for purchases under $10. Convenience alone can entice us to withdraw money from an ATM that forces us to pay a toll.

“If there were two ATMs right next to each other and one was their banks and one was somebody else’s, [consumers] would obviously choose to use their banks’ and not pay the fees,” says David Tente, an executive director with the ATM Industry Association. “But if it’s a matter of a couple of blocks away, then even that sometimes is enough of a deterrent. ‘I don’t want to go there. I’m in too much of a hurry. I’ll pay at this time.’”

But the cost for that kind of convenience is rising.

The average ATM surcharge fee, which is the fee the ATM owner charges you, climbed to $3.09, per Bankrate’s 2019 checking account and ATM fee study. That marks a record high for the 15th consecutive year.  In using an out-of-network ATM, you may also pay a fee to your bank or credit union — usually around $1.63. All in, you can expect to pay $4.72 — up 4.25 percent over the past 21 years on average.  In Houston, you will pay the most ($5.58). Meanwhile, in Los Angeles, you will pay the least ($4.15).

Why banks are charging higher ATM fees

There is the usual suspect for banks charging more to use a 50-year-old technology: adjusting for inflation. But it’s not the only reason why ATM fees are rising when payment alternatives continue to surge in popularity.

In a lower interest rate environment, banks’ profits are under pressure since they can’t charge consumers as much for some loans. So, institutions are charging more for what they view as value-added services — that can include ATM transactions. With surcharge fees, they aren’t risking alienating their customers either.

Moreover, it’s getting more expensive for banks to operate ATMs across the country as consumers continue to transact less on them. “ATM utilization — the number of transactions per month, which is a common metric banks pay attention to — has been in a steady decline for the last decade,” says Bob Meara, senior analyst in Celent’s banking group.

That means the institution must write off the cost of operating an ATM over a smaller set of users. Charging fees can help recoup some of their investment. Spoiler alert: they aren’t making a killing here.

“The amount of money that they make off of those ATM fees is not huge compared to the overall cost to run the ATM network,” says Raja Bose, a consumer banking global leader at Genpact. But it’s something.”

[READ: Cardless ATMs are becoming ubiquitous, but security problems persist]

The high cost of operating an ATM

It’s always been an expensive machine to manage. In addition to paying for the hardware and software, servicing the ATM is among one of the biggest costs.

“Managing cash is expensive,” Bose says. “Counting it, recycling it. The audits. The moving around of [it] in trucks. All of that is very expensive.”

That’s on top of other costs, like maintenance, depreciation and rent. The math only gets messier as more of us deposit cash at ATMs in addition to taking out greenbacks. What sounds simple can add to the ATM operator’s costs. If the ATM can’t dispense the same cash that you deposit into it (and plenty of them can’t), the servicing costs spike.

The death of ATMs is greatly exaggerated

Not everyone agrees that Americans will abandon cash. Sure, we are transacting with cash less, but we’re still transacting with cash regularly. According to a 2019 consumer payments report from the Federal Reserve, consumers used cash in 26 percent of transactions in 2018. Even as consumers transact with cash less frequently than before, some industry observers see the ATM’s future as bright —  its role will just evolve.

There’s already evidence of the cash machine taking on more of the traditional teller tasks.

In addition to taking out money, you can choose what kind of bills you want at some ATMs. Nowadays, some ATMs even let you video chat with a teller.

“Banks are using ATMs to help with branch transformation and to help with cost controls,” ATMIA’s Tente says.

How to avoid ATM fees today

If that future becomes a widespread reality, it’s still a ways off. Right now, you’re mostly using an ATM to withdraw cash — and you don’t want to pay any fees.

The vast majority of consumers (77 percent) say they will do anything they can to avoid paying ATM surcharges, per a June 2019 Mercator report. Moreover, 65 percent responded they would “actively search out ATMs in surcharge-free networks” in the same report.

“Those are some really big numbers,” Reville says. “People are acutely aware of the fact that they are paying fees and they are going to avoid paying those fees.”

If you are wondering how to dodge them, you are in luck. You have a wide range of ways to sidestep them, including:

  • Switch your bank provider. Some bank accounts, like from Chime and Ally, offer access to tens of thousands of fee-free ATMs across the country. Other banks, like Axos Bank,  will reimburse any ATM fees you incur.
  • Pay with your card. Instead of withdrawing cash, pay with your credit or debit card. If you pay with a credit card, remember that you will have to pay interest unless you pay off your credit balance every month.
  • Plan ahead and take cash out at an ATM that doesn’t charge you. Going to a new city? Take cash out of your bank’s ATM ahead of time, so you don’t have to worry about paying any fees.
  • Visit a store. All kinds of places let you get cash back when you pay with your debit card.
  • Use Venmo or Zelle instead. If you’re trying to pay someone you know and trust, consider using a payments app to send them money. But take precautions to avoid scams.
  • Use a fintech service, like Harvest Platform. If you were already charged ATM fees and want a refund, consider trying an app that will fight for your money back after you supply it with bank data. Also consider calling a bank to ask for a fee pardon.

[READ: 7 ways to ditch many of those pesky bank fees using your smartphone]

Bottom line

It’s expensive for banks to operate ATMs. So, they recoup some of their costs by charging fees to people like you. The good news? By taking just a few simple steps, you can easily avoid paying them.

Learn more: