If paying no points closing costs should be around $3.5k which includes both lenders and (optional) owner's title insurance. With tax and insurance escrows, you should need something in the $4k range.
Closing costs are typically between 2-4%. if you want a second opinion on that rate, please feel free to contact me as 4.5% could be high- depending on the property type, etc... My info is @ http://www.LendWithScott.com.
Licensed Mortgage Planner
Regency Mortgage Corp
Your lender should be able to give you an estimate....and, if you want to do some calculations on your own, here is a web-site that may assist with Massachusetts closings:
Your cost will vary, but it depends on if you have any points to pay for your mortgage, if not typical closing cost will include, escrow of taxes and insurance (not always insurance), banks title insurance and get your own (good idea) recording fee's and attorney fees.