The term “closing costs” usually includes a wide range of fees necessary when you’re purchasing a house: fees for an attorney, a title search, title insurance, taxes, lender costs and homeowners insurance. The amount you’ll pay in closing costs often averages 2% to 5% of the purchase price, based on the size of the loan and local taxes and fees.

If you’re buying a home, your loan estimate should include an estimate of closing costs. Shortly before your closing, you should receive your closing disclosure, a document that provides final details about your loan and your closing costs. These costs may include the following:

Lender fees. Some lenders wrap all their costs into an origination fee, while others break them out into a list of such things as courier fees, appraisal costs, administrative fees, processing fees, a credit check, transfer taxes, a flood certification if one is required, and underwriting fees.

An optional closing cost is a discount point that is about 1% of the loan amount. Discount points can be used to lower your interest rate. Consult with your lender to discuss the pros and cons of paying discount points. If you’re cash-poor, you’re less likely to want to pay extra upfront to bring down your interest rate.

Title fees. About 70% of closing costs are title-related, so shop for title service if possible: title search, title insurance and settlement services. Settlement fees can vary by several hundred dollars from one company to another. To compare fees, make sure you understand what’s covered, including a title search and courier fees.

Lenders require that you purchase title insurance — for your and the lender’s protection. Suppose someone claims an ownership right to the home or says he or she hasn’t been paid for work on the property and has a lien against it. Title insurance protects you if previous owners failed to pay taxes.