Borrowing from your 401(k) or withdrawing money from your IRA  before you have retired is generally a bad idea because it can set you back years in reaching your retirement savings goals. Not only do you lose the opportunity to earn compound returns on the money you withdraw or borrow, but people usually stop making contributions when they make a withdrawal or take a loan from their plan, setting them even further back. (To learn what you could lose by taking money out of your 401(k) prematurely, read Employers Offer Alternatives to 401(k) Loans.) Depending on your age and how you plan to use the money, you may also be subject to penalties and a higher-income tax bill (401(k) Loan vs. IRA Withdrawal explains the details).

Before you take any type of loan, take a hard look at ways you might be able to raise money by increasing your income (temporarily taking a side job, for example) or reducing your expenses. What’s more, you might have possessions you could sell on eBay, Craigslist, Poshmark or Facebook to earn extra cash. Maybe you need a budget to help you track your inflows and outflows. (See our Budgeting Basics tutorial.) If none of these options can get you all the money you need, here are the least expensive borrowing alternatives to consider.

Home-Equity Loan

If you own a home, see if you have enough equity to borrow against your home’s value. You gain equity in your home by paying down your mortgage balance and through market appreciation of your home’s value.

In early 2018, most lenders will require you to have at least 20% equity and retain that amount after taking out a home-equity loan.  So if your home is worth $200,000, you will need to have $40,000 in equity plus whatever the minimum loan amount is to be eligible for a home-equity loan. If a lender’s minimum home equity loan amount is $10,000, you’ll need to have $50,000 in equity.

The national average interest rate on a home-equity loan is about 5.5% right now, which is low compared to other forms of borrowing, such as credit cards. However, homeowners can no longer deduct interest paid on a home-equity loan (or home-equity line of credit) because that was banned from 2018 to the end of 2025 by the new tax legislation.

To figure out if you have the required equity, estimate your home’s value by looking at the Zestimate of your home’s market value using or use a real estate website to search for recent sales prices of homes similar to yours. Next look at your last mortgage statement to see how much you still owe on your loan. Subtract the amount owed from the market value to get your equity.

Remember, lenders will want you to retain 20% equity in your home even after taking out the loan, so subtract the dollar amount that percent translates into from your total equity to ballpark how much you might be able to borrow. Then keep in mind that lenders have minimums for home-equity loans, so if you only have $1,000 in equity above the required 20%, you might not be able to get a loan. Home equity loans also have considerable closing costs, which you’ll need to factor in to see whether this borrowing option makes sense.

Cash-Out Refinance

A similar option is to refinance your mortgage and take cash out at closing. If you go this route, you will increase your mortgage balance and it will take you longer to pay off your mortgage unless you refinance into a shorter term. The tax law also has changes for mortgages: From 2018 through 2025, you can only deduct mortgage interest from your taxes on loans of up to $750,000 if you itemize and if the loan is for your primary residence. Previously that number was $1 million. However, if you are refinancing an existing loan larger than $750,000, the $1 million threshold still holds.

Whether it makes sense to do a cash-out refinance depends on how the interest rate on your current mortgage compares to the interest rate you could get on a new mortgage. Plus, you may pay several thousand dollars in closing costs to refinance your entire mortgage.

Since the interest rates on first mortgages (what you’re getting when you do a cash-out refi) are around 4% while the interest rates on home-equity loans are around 5.5%, a cash-out refi may be less expensive, and the closing costs may be worth it if you need to borrow a large sum. Compare the closing costs, monthly payments and total interest costs over the life of the loan to determine whether a home-equity loan or cash-out refi is the most cost-effective option.

Finally, if you’re currently paying mortgage insurance premiums and a cash-out refi would allow you to get rid of them, it could be a better option than a home-equity loan.

Personal Loan

What if you don’t own a home? Or, if you are a homeowner, maybe you don’t want to borrow more against your home, don’t have enough home equity to get a loan, can’t get a good interest rate on a refinance or don’t want to pay closing costs? A personal loan may be a good option.

Personal loans generally have higher interest rates than home loans because they are not secured. That means they aren’t tied to any collateral – anything you physically own, like a house or car. If you default on a home loan or auto loan, the lender can seize your house or car and sell it to get some money back. If you default on a personal loan, the lender can sue you, but there’s no car, house or other object of value it can reclaim. Higher risk to the lender means a higher interest rate for the borrower.

NerdWallet reported that personal loan rates ranged from 6% to 36% in 2017.  Personal loan rates depend on the lender and on the borrower’s creditworthiness. If you have excellent credit, you may be able to get a personal loan for not much more than a mortgage, but without the expensive closing costs. The Simple Dollar recommends LendingClub, Wells Fargo and Prosper for the best personal loans overall; SoFi, LightStream and Earnest for borrowers with excellent credit; and, Peerform and Avant for borrowers with average credit.

Personal-loan interest is not tax deductible.

0% APR Credit Card

If you have good-to-excellent credit, you might qualify for a 0% APR balance transfer or a 0% APR introductory rate. Either of these options could help you get the cash you need. The big question is whether you’ll be able to repay your credit card balance in full before the 0% APR period ends. This period might range from nine to 18 months, depending on the card.

Of the options we’ve presented in this article, this one is the riskiest because it puts you in a position to end up with high-interest debt if you don’t repay your loan on time or if you’re late on one of your minimum monthly payments. (Learn more in 0% Balance Transfers: Who Really Benefits, Understanding Credit Card Balance Transfers and The Pros and Cons of Balance Transfers.)

The Bottom Line

We’re not saying that you should never take a loan from your 401(k) or a withdrawal from your IRA. In some circumstances, these may be your best options (withdrawing contributions from a Roth IRA, for example, are both penalty and tax free at any time). But if you’re looking for an alternative, consider a home-equity loan, cash-out refinance, personal loan or 0% APR credit card. (For further reading, check out Should You Borrow From Your Retirement Plan? and 8 Reasons to Never Borrow from Your 401(k).)

Want to learn how to invest?

Get a free 10 week email series that will teach you how to start investing.

Delivered twice a week, straight to your inbox.