Q: I’m considering borrowing from my 401(k) for a down payment on a house. This is a loan, not a withdrawal. I have to pay it back at 1 percent over prime. The plan has a provision that loans for down payments can be repaid over a period of up to 20 years.

Using such a loan would allow me to purchase a new home without selling my current home. I’d like to either lease the new home or move in for a few years, sell it, and take the profit tax free. Is this a good idea?

A: My feeling is, a retirement account should not be used like a checkbook. Instead, it should be the place you go when you’re out of other options. When you borrow against your retirement account, even if you pay yourself back with interest, you’re missing out on total growth of the account.

What you’re proposing is actually is a bit different. You’re borrowing from your 401(k) to invest in real estate. Essentially, you’re trading one type of investment for another, rather than using the money to pay off debt, buy a boat, or take a trip around the world. This could work out well, provided you understand the pitfalls.

First, when you borrow from a 401(k), you must continue to work at the job to enjoy the leisurely payback you’ve arranged. If you lose your job, or leave, you may have to pay back the entire amount within 60 days, or sooner.

Second, real estate doesn’t always appreciate in value, and investing in real estate doesn’t always work out well. Your property could go down in value, or the house could be vacant for an extended period of time. If you lose the property, you’ll likely lose your investment, which means your retirement will take a double hit (because you’re already losing out on some growth in the 401(k)).

Finally, investing in real estate requires a much greater investment of time and cash than, for example, owning shares in an index fund. You’ll have the costs of purchase and sale, fixing up and maintaining the house (more expensive when you have renters than if you live there yourself) and property taxes.

If you want to keep the profits tax-free, you’ll have to live in the home as a primary residence for two of the five years prior to selling. If you lease the property right after you buy, it won’t qualify as a primary residence until you move in,

Rather than use your retirement funds, I’d rather see you take out a home equity loan against your current home to fund the down payment.