Americans in 2018 are spending a record amount on out-of-network ATM fees. The average cost for such transactions has risen for the 14th consecutive year, from $2.97 in 2017 to $3.02 now, according to the most recent Bankrate.com checking account and ATM fee study. And over the past decade, banks have raised those fees by 53%.

Fortunately, these fees can be avoided most of the time. Doing so requires picking the right bank -- both in terms of how it charges customers and its convenience to where you are -- and being vigilant when it comes to making choices that incur charges.

"Most banks allow you to use their own ATMs at no cost, but your bank may not always be the most convenient way to access cash when you need it," notes The Ascent by The Motley Fool. "Using an out-of-network ATM could cost you fees from your bank as well as from the ATM owner and/or network."

In some cases -- and it's worth checking with your bank to see if it's one of them -- financial institutions have reciprocal deals with their peers that allow you to access affiliated ATMs for free. These agreements vary by bank, so it's definitely important to understand when you will be charged and when you won't.

A person types on the keypad of an ATM.

Be careful when it comes to using ATMs when you aren't clear about what fees you may be charged. Image source: Getty Images.

There is some good news

The fees banks charge their own account holders when they use their ATM cards at other institutions have fallen from $1.72 in 2017 to $1.66 today. In addition, 32% of banks surveyed offer free, out-of-network withdrawals to customers on at least one account -- the highest percentage Bankrate has ever seen doing so.

The average total cost for an out out-of-network ATM withdrawal (which includes any surcharges, plus whatever your bank might charge) has dropped by a penny to $4.68. That's not much of an improvement given that the 2017 total was a record high, and those "all-in" charges are 36% higher than they were 10 years ago.

Overdraft fees followed a similar pattern. They dropped a nickel from $33.38 last year to $33.23 in 2018, but they remain at their second-highest level since Bankrate began this annual survey of banks in the 25 largest U.S. markets more than two decades ago. These fees do vary based on where you live.

Highest Average Overdraft Fee by Metro

Lowest Average Overdraft Fee by Metro

1. Philadelphia

$35.30

25. San Francisco

$31.44

2. Baltimore

$35.05

24. Los Angeles

$31.89

3. Houston

$34.33

23. Minneapolis

$31.95

4. San Diego

$34.22

22. Boston

$32.05

5. Phoenix

$34.15

21. Seattle

$32.10

Data source: Bankrate.

Be careful

If you need some cash in a hurry, you may not have the option to be picky about which ATM you use to get it. One can, of course, usually avoid letting the situation become that pressing with a bit of planning. If your finances have the wiggle room, stock up on cash when the opportunity to use a free ATM arises, or keep a little extra stashed in the house so that if your wallet gets light, you're covered until you can get to a machine in your bank's network.

But on a more fundamental level, it's important to know your bank's policies, and make sure you have the type of account that's right for you, said The Ascent by The Motley Fool bank analyst Nathan Hamilton. 

"Savers should consider online checking accounts versus a traditional brick-and-mortar national bank since online banks tend to charge fewer nuisance fees, including for ATM withdrawals," he said. "You can uncover the ATM surcharge your bank charges with some sleuthing, either by reviewing your monthly account statement or account terms that are available online or by phone through your bank's customer service contact."

It pays to be diligent. Banks clean up on ATM fees mostly because so many consumers either don't care or don't pay attention. If you do, just a little planning and research can add up to a whole lot of savings.

The Motley Fool has a disclosure policy.