A home and a car are two of the biggest purchases most consumers will ever make. But it may surprise you to learn that one can actually help you buy the other. That's right -- you can use a cash-out mortgage refinance of your home loan to buy a new automobile.

This method of financing was quite popular in the years prior to the recession, when skyrocketing real estate prices left many homeowners awash in equity, and lenders were eager to show them how to tap into it. And while this method of financing does present a number of advantages, there are also potential downsides to be aware of, some of them quite serious.

That being said, there are situations where tapping your home equity to buy a car can still make sense. It depends on your situation.

How does it work?

With a cash-out refinance, you're taking out a new mortgage to pay off your old one, while borrowing some additional money at the same time. So if you owe $130,000 on your current mortgage and are looking to borrow $30,000 for a car purchase, you'd end up owing $160,000, plus fees, when the transaction is done.

To qualify for this type of loan, you need a certain level of equity - that is, value of your home over and above what you still owe on your mortgage. Generally, you'll need to have at least 20 percent equity remaining in your home after a cash-out refinance, so in the example above, your home would have to be worth at least $200,000 to make the deal work.

Why use your home to buy a car?

One of the big reasons for using a cash-out refinance to buy a car used to be that you could get a better interest rate on a mortgage refinance than you could with a car loan, but that really isn't the case these days. In fact, interest rates on auto loans are actually running lower than for mortgages at most lenders right now.

However, a mortgage has a big advantage over a car loan in that the interest is tax-deductable, provided that you itemize deductions and meet certain other requirements. So that's taking a big bite out of your interest costs right there. Depending on your financial circumstances, boosting your available deductions can have its own advantages as well.

Rolling the cost of a car purchase into your mortgage also means you're making just a single monthly payment, instead of making separate payments each month for your home and auto loans. So it's more convenient.

Financing a car purchase this way also means you can stretch out the financing over a longer period of time. Mortgages are usually repaid over a period of 15-30 years, while car loans are typically 2-5 years, so your additional outlay each month is less.

What about the downsides?

This points up one of the major downsides of financing a car this way. Your car may only last 10 years, but you could be paying for it for 30. However, that may not be a bad choice to make if you're in a temporary situation where finances are tight - such as if you're paying off medical bills, a lawsuit or a divorce settlement and need a new car. You don't have much extra money right now but will in a few years once those current bills are paid off. In that case, a cash-out refinance can provide you with some wiggle-room to get past the crisis, or perhaps even be used to pay off the bills that are causing difficulty in the first place.

You probably don't want to use a cash-out refinance to finance a car purchase unless you can also use it to obtain more favorable terms on your current mortgage, such as getting a lower interest rate than you currently have. That's because the closing costs on a refinance are substantial - often 2-3 percent of the loan amount, even higher if you pay points to buy down the rate.

So if a cash-out refinance leaves you with a $200,000 mortgage, you'll probably end up paying at least $4,000-$6,000 in fees, which are added to the effective cost of your car. But if you can get a lower mortgage rate at the same time, that could make the transaction worthwhile.

One way to avoid this is to use a home equity loan, rather than a cash-out refinance. In that case, you're taking out a second mortgage for just enough to pay for the car. The closing costs are far less, because you're borrowing far less than the full mortgage amount. And the interest is still tax-deductible, though the rate may be higher than on a regular mortgage. The repayment term will be shorter as well, so the monthly outlay will be more than on a 30-year mortgage, but it's less likely the loan will outlive the car.

The biggest risk

The biggest reason not to use a cash-out refinance or any type of home equity loan for a car purchase, however, is that you're pledging your home, perhaps your most permanent and valuable asset, as surety in the purchase of a temporary asset like a car, which will depreciate in value over time.

Not only that, but you could lose your home if your mortgage payments should eventually become unaffordable, due in part to the cost of financing the car. That's how a lot of people got in trouble during the housing bubble - they used their home equity as a piggy bank to fund the purchase of cars, boats, vacations, and other goodies, and then found themselves unable to pay the bills when they suffered a financial setback - and lost their home to foreclosure as a result.

So think about it carefully. Using home equity to buy an automobile is far from an automatic decision. But if the tax deductibility and lower monthly payments are appealing, and the other financial aspects make sense, a home sweet home could be just what you need to buy a car sweet car.