It depends on whether you are applying MD-only or MD and DO or DO-only, how many schools, how many secondaries you ultimately decide to fill out (because many people often end up skipping a few), how many grant you interviews, and where those interviews are located. But long story short, $5K+ is reasonable.
The best you can do is estimate and these costs are readily available if you search the respective websites. I'll break it down with some examples from my experience and from those of friends.
Say you decide to apply to 15 MD and 5 DO. AMCAS is currently $160 for the first school and $35 for each additional school. AACOMAS is $195 for the first school and $35 for each additional school (though it is more if you add schools later). You will have to pay to send transcripts to both services from all of your schools attended and there could be an additional cost if you are using a service like Interfolio to copy AMCAS on recommendation letters. Total cost for primary apps ~$1,000.
Secondary app fees can range anywhere from $30 on up ($100 is common). Let's estimate the secondary fees are $75 apiece and you finish all the secondaries. Add ~$1,500 for secondaries.
You receive interview invites to four medical schools. You decide you need a new suit and shoes. Add ~$400.
One of the invites comes from a school within a two-hour driving distance. Add ~$50 for gas, parking and a quick bite before the drive home.
The second school is four-hour drive away. You drive your own car but you decide to arrive the night before and get a clean but affordable hotel room. Add ~$150 for gas, parking/tolls and a hotel room and an inexpensive meal or two.
The third school will require a $250 flight, taxis to and from the airport, public transportation, and one night at a hotel in a fairly expensive urban area because no med students were available to host you the night before the interview and you don't know anyone in town. Also, you go out to dinner and have some drinks with the med student and his friends, so you buy a round as thanks. Add ~$700.
The fourth school requires a $600 cross-country flight, plus you need to rent a car, and spend the night before and after the interview. It's so far from home that you decide to bring your significant other and make a mini vacay out of it. You get two nights with a friend to save money and spend time with that person, but pay for a couple nights as well so as not to overstay your welcome. You pay for the hotel since it is YOUR interview ($200) and buy dinner and drinks for your friend ($50), split the cost of the car and gas with the S.O. ($150), and cover your own meals out for a couple days plus some sightseeing and entertainment. Add ~$1,300.
Total cost is about $5,100.
You might also want to factor in the cost of a deposit for your chosen med school. Mine was $2,000 ($1,250 and then $750 several months later). That gets applied to your tuition, but it is an upfront cost to consider.