Coming up with the down payment for a mortgage can be the single biggest obstacle to homeownership for many aspiring homeowners. For some, tapping into their Roth IRA can provide the necessary funds. The question is, do you really want to break that particular piggy bank?

A Roth IRA offers a number of advantages over other types of retirement accounts when it comes to withdrawing funds for purchasing a home. First, because you've already paid taxes on contributions to the account, you can withdraw them without penalty or additional taxes, even if you're younger than age 59.5.

If you're a first-time homebuyer, you can also withdraw up to $10,000 in Roth investment earnings without penalty for the purpose of buying or building a home, provided you've had the account for at least five years. Otherwise, there's a 10 percent penalty on earnings withdrawals.

Remember, the basic idea behind a Roth IRA is that you deposit after-tax funds to earn tax-free interest - which is why you can withdraw the contributions at any time but can only withdraw earnings prior to age 59.5 without penalty in limited circumstances.

Money for a mortgage or retirement?

However, the question remains, is tapping your Roth IRA for a down payment on a mortgage and home purchase something you really want to do? Remember, your Roth is money that you're saving up for retirement. Every dollar that you take out is a dollar that won't be available down the line and, more important, won't be generating interest and compounding for you to create a nice nest egg.

Of course, you'll need a place to live in retirement, so using part of your Roth money to help acquire that asset can be a sensible thing to do. And like the earnings on your Roth, the appreciation on your home is also tax-free, assuming it's your primary residence. And with home values as low as they are right now, one might conclude there are some real bargains to be had that will appreciate significantly once the real estate market recovers.

IRA usually has better rate of return

But don't forget, the stock market is way down as well. And investments in equities and mutual funds are just as likely to show strong increases as real estate, once the economy recovers. Your money will likely earn a better return staying in your Roth IRA than it would investing it in a home - over the past 22 years, existing home prices appreciated an average of 3.4 percent a year, according to the Case-Shilling Index, while the "ballpark" figure for returns on an IRA is 8 percent a year - so financially, your deposit money is likely to appreciate faster by leaving it in a Roth.

If homeownership is important enough to you that you do decide to tap into your Roth IRA, you need to decide how much to take out. Many people assume that a 20 percent down payment is optimal because doing so enables them to avoid paying private mortgage insurance (PMI), which generally charges about 0.5 percent of your loan amount annually.

Smaller down payment could mean lower interest rate

A bigger down payment usually means a lower interest rate as well, although that is not always true in the current credit environment. Some lenders are actually offering better rates to mortgages with smaller down payments precisely because those loans are insured through PMI - so it's worth checking into before committing one way or another. Also, even though you have to pay half a percent in PMI, a smaller down payment will enable you to leave more in your Roth account, where it's likely to appreciate faster than the value of your new home.

Other retirement accounts

You can also tap into other retirement-type accounts, but they're not as attractive as a Roth IRA for purposes of buying a home. You can withdraw up to $10,000 from a traditional IRA for use in buying a home without paying a penalty if you're a first-time homebuyer. If you're married, you can double that to $20,000 if your spouse has an IRA as well. However, you'll still have to pay taxes on whatever you withdraw, since the original contributions were tax-free.

You can also make a withdrawal from a 401k plan, but there's no way to avoid paying a penalty there. You can borrow from a 401k plan if you like, but that means you have to pay it back, with interest, within a few years to avoid penalties. Overall, a Roth IRA, if you have one, is a much more attractive option.