Washington has the 10th-highest closing costs in the country, according to a recent survey of lenders by Bankrate, with Virginia and Maryland coming in at 29th and 35th, respectively.

Though the bottom line is roughly the same among the different jurisdictions -- the closing costs for a $200,000 loan with a 20 percent down payment and great credit are estimated at $3,952 in the District, $3,648 in Virginia and $3,582 in Maryland -- there is a lot of variation within the totals.

There are two categories of closing costs. Origination charges include application and underwriting fees, loan points and document preparation fees. Some lenders charge one or two of these fees; some charge all of them. Title and settlement costs are lender title insurance, recording fees and transfer taxes.

Closing costs also do not include many of the expenses a borrower will encounter at closing, such as hazard, flood and private mortgage insurance, owner's title insurance, prepaid interest and prepaid escrow.

While estimated total closing fees range from a low of $3,006 in Missouri to $5,435 in New York state, Stephen Papermaster of First Title & Escrow in Rockville said that nationwide the origination portion does not vary much, ranging from $1,500 to $1,800.

"Competition in this area is good almost everywhere and keeps these fees down," he said. "Title insurance and transfer fees are the big issues."

It can be confusing to sort these out. The District has higher transfer and recording fees, but Maryland and Virginia also require borrowers to purchase tax stamps. Then, while Maryland and the District only assess transfer taxes on home purchases, Virginia charges them for refinancing as well.

Papermaster said there are so many permutations that his company has developed software so loan originators can keep track of the variations and combinations.

Borrowers, however, are not totally at the mercy of lender fees or state-mandated charges. Some origination and settlement fees are negotiable.

Justin Exner of Fairway Independent Mortgage in Ashburn said borrowers make the final decision about points paid at origination to buy down interest rates. A fee of 1 percent of the loan amount typically lowers the rate 0.25 percent. "It is important that buyers determine where points and savings break even," Exner said.

Borrowers also have a small say in title insurance costs. Papermaster said premiums are based on loss ratios and, for a variety of reasons, the ratio in the District is much higher than in either Virginia or Maryland, so title insurance there costs over 40 percent more.

Borrowers can select their own title company. Settlement services and title service fees associated with the insurance can vary, so it pays to shop around.