If you are thinking of buying a second home, you may want to think again. That's because the rules on deductions for owning a second home will change in 2018 once the just-passed tax bill takes effect. The massive overhaul lowers the mortgage interest deduction to $750,000 from $1 million. That cap applies to all homes. The $1 million limit will remain for homes that were purchased before Dec. 15. If you already have a $750,000 mortgage and plan to buy a second home next year, you will not be able to deduct the interest on that loan, according to Tim Steffen, director of advanced planning at Baird Private Wealth Management. If you have a smaller mortgage, let's say $600,000, up to $150,000 of additional debt would be fully deductible.

Another tax change is the elimination of the interest deduction on new and existing home equity loans. "Nothing is grandfathered on that," Steffen said. "Those just go away." The legislation also caps the deduction for state and local income taxes at $10,000. "Most people who are going to be purchasing a second home have already exceeded that cap," said Eric Hananel, principal at accounting firm UHY Advisors, NY Inc. Under current tax rules, about 44 percent of homes are worth enough for homeowners to take advantage of the mortgage interest deduction by itemizing their expenses, according to real estate website Zillow. The portion of eligible homes would dip to 14.4 percent under the new tax law, Zillow projects, particularly as the standard deduction is nearly doubled from existing amounts. Buyers should also keep in mind that the legislation may drive down the price of some real estate, Hananel said. "My belief is that the second home market will be impacted even greater," Hananel said. I would urge them to sit back and see the impact of the tax legislation and how it affects the real estate market, he said. Markets that will likely see the most change in value are the ones where residents are more likely to use the mortgage interest deduction, according to Zillow. Those effects will be most evident in pricey coastal markets while other markets could mostly remain stable, Zillow senior economist Aaron Terrazas said. The real estate website ranked the U.S. counties where the interest on the first year of a loan would be high enough to justify taking the mortgage interest deduction.

Percent of homes under current law Percent of homes under proposed compromise bill County Name State Name 100% 99.81% New York New York 100% 99.51% San Francisco California 100% 98.94% San Mateo California 100% 98.49% Santa Clara California 99.99% 96.85% Marin California 99.80% 84.59% Kings New York 99.93% 82.46% Queens New York 99.40% 80.45% Alameda California 99.84% 77.81% Westchester New York 97.35% 74.83% Maui Hawaii

Zillow also identified the counties where the interest on the first year of a mortgage loan likely would be too low for residents to take the mortgage interest deduction.

Percent of homes under current law Percent of homes under proposed compromise bill CountyName StateName 0.37% 0.00% McKinley New Mexico 0.36% 0.02% Jefferson Arkansas 1.62% 0.03% Livingston Louisiana 9.09% 0.04% Bullitt Kentucky 0.69% 0.05% Wayne North Carolina 8.24% 0.06% San Juan New Mexico 5.08% 0.06% Clark Indiana 8.01% 0.06% Isabella Michigan 2.75% 0.06% Northumberland Pennsylvania 4.31% 0.07% McCracken Kentucky

Buyers should not base their decision on whether to purchase a second home solely on taxes, experts said. "I don't think you should be so close that the tax implications are going to make or break the deal," said Mark Steber, chief tax officer at Jackson Hewitt. There are several other criteria buyers should consider before signing on a second home.

Make sure you can afford it

Evaluate why you want to buy the property and if you will be able to cover the maintenance costs, said Peter J. Creedon, CEO of Crystal Brook Advisors in New York. "It's not just what you will pay for the mortgage," Creedon said. "It's all the other things that will have to go into the house." That includes maintenance for everything from a fresh coat of paint to major repairs that inevitably crop up.

Watch out for hidden expenses

Many second homes come with a vacation-type atmosphere — and that often costs more. That includes fees for communities or homeowners associations. You also want to look at other expenses that will drain your cash flow, including whether you will keep a car there, and how often you will eat out and entertain visitors. "In many cases, you're better off going to the swankiest hotel in town and having room service every day and it will still be cheaper," said Ron Weiner, partner and managing director at RDM Financial Group at HighTower Advisors in Boca Raton, Florida.

Understand the rules for how you use it