For the second year in a row, Texas had the second-highest mortgage origination, title and closing costs, according to’s annual survey, which based closing costs on a $200,000 mortgage.

New York topped the list for the third time with an average cost of $3,830; Texas’ was $3,413. Mid-range states were Michigan and Minnesota at $2,694 and $2,692, respectively. Indiana was least expensive at $2,339 — about $1,074 less than Texas.

The next most expensive states were Florida, Pennsylvania, Ohio and Hawaii. After Indiana, the least expensive states in which to buy a mortgage are Wyoming, Illinois, Nevada and North Carolina.

Fees vary from state to state because of differing taxes, customs and regulations.

The survey also found that states with the biggest populations tend to have the highest mortgage-related fees. The five most expensive states are among the seven most populous: New York is third in population, Texas is second, Florida is fourth, and Pennsylvania and Ohio are sixth and seventh.