Investing in stocks can be profitable, but comes with no guarantee of gains. It’s possible you could invest your equity and lose your entire investment. And remember, while your investments may generate money, you’ll also be paying interest on the home equity you borrowed.

Whether you want to buy a second home or an investment property to rent out and generate income, using the equity from a cash-out refinance can save you from dipping into your savings to fund the purchase. Because real estate tends to see less erratic swings than the stock market, your investment property will likely gain in value over time, with less risk of your investment losing value.

And while it’s easier to buy stocks than real estate, there are more potential tax benefits from investing in real estate.

turns the equity you have in your home into cash. It replaces your existing mortgage loan with a new one for a larger amount than what you currently owe, and lets you pocket the difference between the two balances in cash — less any closing costs.

A cash-out refinance has two main benefits. It turns the equity you have in your home into cash, and your new mortgage loan could come with a lower interest rate, a lower monthly payment or possibly both.

Investing in stocks can be profitable, but comes with no guarantee of gains. It’s possible you could invest your equity and lose your entire investment. And remember, while your investments may generate money, you’ll also be paying interest on the home equity you borrowed.