Which should you do first: save for a house or save for retirement?

Wondering whether you should put money into saving for a down payment on a house or start investing it for retirement?

The answer, ideally, is both. By investing in a mix of assets you are putting your money to work in different ways -- and potentially hedging against the risks associated with each type of investment.

But most financial experts say retirement saving should be prioritized. That's because the cost of an average retirement is more than $700,000 -- or about 2.5 times that of the average cost of today's house, according to a recent Merrill Lynch report.

"I think for somebody starting out, establishing their core investment portfolio is key," Todd Smith, a certified financial planner who is president at Level 5 Financial, told CBS MoneyWatch. "It's going to be a function of cash flow. We're all stretched to some degree,  but if you have a match at work [in a company retirement plan] and then go hard for that house, I think that's not a bad strategy."

Because real estate is an illiquid asset, your primary home should not be factored into retirement planning. To access that money, you would have to sell, refinance or take out a home equity loan.  

If purchasing a house is a priority, there are important financial factors to consider. First, can you manage the monthly mortgage payments, taxes and home-maintenance costs? Second, will you also be able to still contribute to your retirement savings?

Remember: It's best to max out company-matched retirement funds or save at least 10% of your annual income for retirement. In the case of most retirement plans, once you reach the approved withdrawal age -- 59 ½ in most cases -- you can withdraw money without penalties.

If you are renting and not saving for a downpayment, it's important to invest the money not being spent on housing, and save where you can, Daniel Frankel, Founding Principal at WealthCollab, tells CBS Moneywatch.

"Take an approach that depends on your lifestyle," Frankel said. "I'm not sure it makes sense to not just rent, if you can just invest.  But you have to be willing to invest. You have to be investing whatever you don't put into [owning a home], if you are just renting."