With housing prices falling and mortgage rates at historic lows, buying a second home may be a good investment if you plan the purchase carefully.

Obtaining a loan in this climate will be challenging, but if you have a good credit score and some extra money on hand, a second home might pay off big down the road. Here's what you need to consider before you buy:

Be sure you can afford it: The asking price doesn't tell the full story of a second home's cost. Lenders often require a 20% to 30% down payment on a second-home purchase. You're also likely to pay a higher interest rate to cover what lenders see as the increased risk of default. If you get into financial trouble, they reason, you're likely to prioritize the mortgage payments for your primary home. Run the figures thoroughly with your real estate agent before you commit.

Also, consider the hidden costs of a second home. Especially if you buy a condo, you will have to pay a homeowner's association fee. And plan to keep a fund worth about 2% of your home's cost for annual maintenance.

And be sure to factor homeowner's insurance into your budget. This policy is likely to be more expensive than insurance for your primary residence. Because you'll be on the premises less frequently, your insurance carrier must factor in greater liability costs.

Don't be overly optimistic about rental income: Many second-home buyers plan to cover their costs by renting the home to other vacationers. Bear in mind, however, that the economic climate, bad weather and pure capriciousness may leave you with fewer renters than you hoped.

To increase your chances of making your vacation home self-sustaining, consider working with a local real estate agent or property manager to attract renters. Of course, you'll have to pay them a portion of the rent, typically 15% to 25%. But the fee may be worth it to avoid the hassle of dealing with renter concerns.

If your efforts to find renters are successful, you may owe taxes on the resulting income. If you rent your home and stay in it at least two weeks a year, you can deduct mortgage interest and property taxes, saving you a bundle. However, a home that's rented out and never used for personal recreation will be subject to different standards, so consult an accountant before diving in.

Find the best bargain: Would-be buyers have a lot of leverage right now because so many houses are on the market. Don't be afraid to make an offer much lower than the listing price or to ask for additional perks, like a decorating budget or help with the closing costs. Anything goes in this market.

You'll get the best bargain if you come armed with a ton of information. Commercial sites like zillow.com and trulia.com can help you nail down current local and national housing figures, as can the databases at the local assessor's office.

Consider resale value: If you hope to profit from your second home, resale value is a crucial factor to consider. Gather information about pricing trends in your home's location, and factor in the time horizon you are targeting for your gain. There is no guarantee that your house will appreciate in the short term. But if the home is in a locale you'd love to vacation in and you can hold on to it until the housing market rebounds, a second home may be right for you.