Remember that closing costs can be paid by seller or buyer and can be negotiated between them.
There are 3 parts to charges above the sale price. Let's say you buy a $100k house (that's the sale price). There are charges for completing the transaction, such as title insurance, commissions, real estate taxes for the current year and so on. Typically, the commissions are paid by the seller, the taxes are paid by the seller up to the day of closing (the buyer pays for the period after closing) and other expenses are normally split equally. If the closing occurs near the end of the year after the tax bill is issued, then the buyer will be paying the remaining taxes for the year at closing; if the closing is before the tax bill is issued, then the buyer will receive a credit for the seller's proration and then the buyer has to pay taxes in January.
There are also charges to the buyer for getting his loan. Lender charges are estimated when you get a GFE (Good Faith Estimate) from your lender.
The third component are pre-paid costs. The lender requires the buyer to carry homeowner insurance and to pay for that premium upfront. They also require money to be set aside for future taxes and insurance in an escrow account at the lender. All these pre-paids increase the cash the buyer needs to bring. While they're technically not closing costs, you need to take account of these prepaids, too.
Loan charges vary a lot, but as a rule of thumb, maybe 3-4% of sale price.
Closing costs for buyer are usually the splits and wind up running around 1%.
Pre-paids vary even more than loan costs but by time of year. They might be 1-2%.
Your Realtor and your loan officer can help you get a more accurate estimate based on the deal you're interested in and the amount seller will pay of these costs. Remember FHA is going to require 3-1/2% of your own money in the deal minimum, plus some portion of the 'costs' above. .