If you've ever wondered whether it's a better financial strategy to prepay your mortgage or to save more for retirement, a recent study provides a few insights.

Three researchers, using data from the Federal Reserve's Survey of Consumer Finances, recently studied households that had accelerated their mortgage payments instead of depositing more money into their workplace retirement accounts, like 401(k)s.

The researchers concluded that nearly 40% of households who opt to prepay their mortgages -- either by making larger payments or by taking a loan term for less than 30 years -- made a financial mistake. They would have been better off investing the extra money in a tax-deferred retirement account, like a 401(k).

On average, those families could gain $0.11-$0.17 per dollar by redirecting their mortgage prepayments into a 401(k). That comes out to a potential savings, on average, of about $400 per household every year. Clemens Sialm, assistant professor of finance at University of Michigan's business school and one of the study's authors, called the magnitude of the financial loss striking.

Why did these households choose a financially losing strategy? The researchers say they were influenced by an aversion to taking on debt. They just wanted to see that mortgage loan balance fall as fast as possible.

That's an emotional decision, and sometimes emotional decisions are the right decisions. But buried in the study's discussion, the researchers make some points that anyone who's desperate to pay down the mortgage might want to consider.

  • Homeowners who refinance their mortgages to take advantage of lower interest rates stand to lose even more by prepaying their mortgages instead of maximizing their contributions to 401(k)s.
  • Homeowners who fail to contribute enough money to their 401(k)s to get their employers' entire matching contribution leave free money on the table -- another losing strategy.
  • It may be easier to borrow against your home equity instead of your 401(k) balance in an emergency. However, that's not a foolproof strategy. A dip in housing prices could wipe out the equity you've been building by diligently prepaying your mortgage.
  • Homeowners may fear losing their houses. But in the event of bankruptcy, a 401(k) retirement account generally gets more protections than a home, and household exemptions vary by state.

In general, the research found that it's better to opt for the 401(k) if your pre-tax return in your retirement account exceeds your after-tax rate on mortgage borrowing.

Workplace retirement funds also offer other great perks, like free money and tax deferral. Learn more ways to bulk up your retirement accounts at the 401(k) Center.

For more reading about weighing your financial choices, take a look at these articles:

Our retirement newsletter offering, Motley Fool Rule Your Retirement , can show you how to make the most of your savings. You can read the current issue, plus all the previous ones, by simply taking a free trial today.

Fool contributor Mary Dalrymple welcomes your feedback.