We research all brands listed and may earn a fee from our partners. Research and financial considerations may influence how brands are displayed. Not all brands are included. Learn more.

Illustration by Money

This story is part four of a five-part series on the best way to launch your own business.

With a burning desire to start a business, you may be tempted to wager your life savings. After all, who better to bet on than yourself? But that logic can leave you in a world of financial pain if your business doesn’t pan out.

Match your risk taking to your age

Once you hit midlife, a good rule of thumb is to limit your investment in a new business to no more than 30% of your savings, says Rohit Arora, CEO of Biz2Credit, an online matchmaker for small businesses and lenders. That way you’ll still be able to recover if things don’t work out. “A lot of times it makes sense to buy an existing Main Street business instead of starting one from scratch,” he says. “It’s more predictable, and getting outside financing is easier.”

Be careful which funds you tap. When you’re young, raiding retirement savings or guaranteeing a bank loan with your house is a reasonable risk, but those moves become more perilous later. “Anyone over 45 should think long and hard about risking their retirement money and their house,” says Steve King, partner in Emergent Research, a firm in Lafayette, Calif., that studies the freelance economy. “If you’re under 40, you’ve got a long time to recover.”

Make it legal

Setting up an LLC or S corp right away will establish a legal separation between you and your business. “You don’t want to jeopardize your personal assets,” says Gene Zaino, CEO of MBO Partners, a firm in the Washington, D.C., area that provides technology and other services to independent contractors.

Which to choose? Chat with your accountant. Many entrepreneurs opt for LLCs because tax filing is very similar to how it is as a sole proprietor. S corp status offers other tax benefits, such as shielding income from self-employment tax.

Get covered

Zaino recommends both professional liability business insurance, to protect you from lawsuits in case you make an error, and general liability insurance, which will cover you in the case of personal or property damage to others. In a 2014 survey, Insureon, an online insurance agency for small businesses, found that a professional liability policy for a firm with 10 or fewer employees ran $575 a year on average. A general liability policy for the same size company was $985 a year on average.

Look for health savings

When you leave a corporate job, you should be able to keep your health insurance (on your dime) for 18 to 36 months. Also price out individual policies on the federal insurance marketplace Healthcare.gov, especially if you expect to earn little for now. You’ll qualify for a subsidized premium with an income up to $47,080 this year as an individual, $97,000 for a family of four. Open enrollment has closed for 2016, but you can sign up midyear if you quit your job or are let go.

Remember retirement

It’s unlikely you’ll be able to sock away significant retirement savings at this time, but putting a small amount of money aside now can keep the ball rolling until you have more to save. Many experts recommend a solo 401(k) because you can tuck away the most money—up to $53,000 for 2016, depending on your income (plus catch-up contributions for those 50 and older).

Next in this series: 5 Secrets to Surviving Year One of Your New Business