If you’ve never bought a house before, then you might not be familiar with closing costs — and if you’ve never sold a house before, then you may be unaware that sellers have to shoulder some closing costs of their own. For buyers, closing costs encompass lender fees, title company fees, prepaid costs, and a handful of miscellaneous components that could be classified under more than one category; for sellers, closing costs typically include agent fees and some title fees, too.

Closing costs vary depending on where you are in the country, which title company you’re using, and a number of other factors; typically, buyers can expect their closing costs to encompass between 2% and 5% of the total price of the house, and closing costs for sellers will depend heavily on the real estate agents’ commission fees (typically 5% to 6% of the home’s sales price).

What do you need to know about closing costs? Read this overview carefully, then talk to your agent about what’s relevant to your situation and what isn’t. When you do secure a mortgage loan, the Closing Disclosure that your lender is required to provide to you will include a summary of the closing costs you owe.

Purchase-related fees

Most lenders will require both an appraisal and an inspection in order for to fully approve the loan, allowing it to close. These are typically (but not always) the buyer’s responsibility.

Appraisal: An appraisal is an official document that records the value of the home you’re buying. The appraisal is conducted by a licensed appraiser, who will visit the house and use a few different methods to determine how much the home is worth.

Inspection: An inspection determines that the house being bought is free of any major issues; the inspector will check the foundation, heating and cooling systems, plumbing and electrical, and a number of other areas and aspects of the home to ensure that there are no problems that might render the house uninhabitable. Often additional inspections, such as a termite inspection or radon test, includes an additional cost, but it might be something you want to do anyway.

Lender fees

Your lender will have different costs affiliated with your mortgage loan, and those are usually the buyer’s responsibility to pay. Some of them could include:

Application fees: This is the fee some lenders charge to process your loan application. It might be paid upfront, but if you’ve been approved and end up buying a home through that lender, it could also get wrapped into your closing costs. Application fees might include the cost of a credit report and could also cover other administrative expenses.

Administrative fees: Some lenders will include an administrative fee for handling your mortgage loan — this might also be known as a processing fee, loan origination fee, or an underwriting fee, and it’s usually the biggest (or one of the biggest) components of the lender’s fee. It might include attorney fees, courier fees, notary fees, and more; it’s the summary of the cost for document preparation, filing, and getting the loan from start to finish.

Attorney: This could be broken out separately or packaged into the administrative fee; it covers the cost to have an attorney examine and sign off on your loan.

Courier: If a courier is needed to shuttle documents from one party to another, then a courier fee could be racked up and applied to your closing costs.

Credit check: The lender will need to determine your credit before it can decide on loan limits and offer you a mortgage interest rate; this might be wrapped into your administrative fee, or could be listed as a stand-alone fee in your closing costs.

Discount points: You can buy down your interest rate when you purchase your home; this involves paying for a percentage point (or half a percentage point, or however much you are purchasing down your rate). If you decide to do this, it’ll be paid when you close on the loan.

Flood certification: Is the house you’re buying on a floodplain or not? The flood certification fee is part of this determination — lenders might need this certification to be able to approve the loan.

Prepaid interest: There’s usually a gap of 30 to 60 days after you close but before your first mortgage payment is due, and the lender might want you to pay the interest on the loan for that gap period at closing — the prepaid interest.

Mortgage broker’s commission: Your mortgage broker needs to get paid for the work done on the loan, and the commission will be included in the closing costs, too.

Mortgage insurance fees: If you’re putting less than 20% down on the home, you’ll probably need private mortgage insurance, which could involve a number of fees, including a mortgage application fee and, potentially, upfront payments on your mortgage insurance premium

Title company fees

The title company manages the actual transfer of the home from one owner to another, and there are a number of components involved, including potentially:

Escrow fee: Also called a closing fee or a settlement fee, this is the fee that pays the title company for its services managing and facilitating the home sale.

Escrow deposit: It might be a condition of your loan to put down an advance on your property tax or private mortgage insurance (if applicable) when you close; if necessary, this comprises the escrow deposit.

Title insurance: The title company will conduct a title search on the property (see below), but if the title search misses something, title insurance provides protection. Title insurance can be secured for both lenders and for homeowners — and when there’s a lender title insurance policy on the home, the buyer or new homeowner is not necessarily protected, so it’s a good idea to at least think about paying for title insurance at close.

Title search: The title search is an investigation to ensure that there are no other claims or outstanding liens on the home that could potentially compromise the buyer’s ability to buy it or right to own it. The title company will charge a fee for this service.

Sellers’ closing fees

Agent commission: The real estate agents involved in the deal need to get paid, and this typically comes out of the seller’s pocket; they pay the agents’ commission at closing, which varies but typically comes in at between 5% and 6% of the home’s total sales price.

HOA transfer fee: If there’s a homeowners’ association, the seller will need to pay a transfer fee and also show that dues are up to date.

Transfer taxes: When the title is handed from the seller to the buyer, there’s usually a tax charged that’s known as a transfer tax, which is usually paid by the seller.

Other fees

Recording fees: The city or county charges this fee for recording land records and ensuring your deed and sale is updated after the transaction closes.

Surveys: Not required in every state, the survey involves checking the home’s property lines and components of those property lines, such as easements or shared fences.

Are closing costs negotiable?

Closing costs are negotiable for both buyers and sellers. Buyers might be able to get sellers to agree to pay some or all of their closing costs, depending on how long the home has been on the market and other factors that might entice the seller to make some concessions. And sellers, of course, have the right to refuse any such requests by the buyer’s agent; they also have the ability to negotiate the agent commission.

Don’t let closing costs intimidate you as either a buyer or a seller. Get a copy of your Closing Disclosure if you’re buying a home, and talk to your real estate agent if you’re selling, so you can stay on top of what’s required and what you need to know to get to the other side of the closing table quickly and seamlessly.