Everyone has been guilty of wasting money on occasion. Whether you impulsively bought a pair of shoes, spent too much on groceries and ended up tossing out spoiled food, or signed up for monthly subscription services you don't use, we've all been there.

However, some types of wasteful spending are more dangerous than others. And there's one awful expense older adults are wasting money on that could put their financial futures at risk.

A roulette wheel at a casino

Image Source: Getty Images

Baby boomers are gambling with their savings

Baby boomers -- those aged 55 to 73 -- spend more on gambling than any other generation, a recent survey from Bankrate found, shelling out an average of $2,913 per year on the vice. That's a lot of cash to spend on something that very rarely pays off, and it's especially disturbing considering the average older adult is falling behind on their savings.

Half of adults age 55 and older have zero retirement savings, a report from the U.S. Government Accountability Office found. And according to a report from the Transamerica Center for Retirement Studies, among baby boomers who do have money stashed away for retirement, the average nest egg is worth just $152,000. For most retirees, that money likely won't last more than a few years.

Of course, many of those who gamble may rationalize it by telling themselves that if they hit the jackpot, they'll put their winnings toward their savings. But in reality, you're much better off simply investing the money you would have spent gambling. Although investing in the stock market doesn't provide guaranteed results, you are much more likely to build a solid retirement fund if you save wisely rather than risk it all on lottery tickets or poker.

Just how much could you accumulate by investing instead?

To see just how much your savings could grow if you were to invest that money rather than gamble with it, let's look at a hypothetical example.

Say for instance you're 55 years old with no savings, and you're spending $3,000 per year on gambling. You instead start stashing that cash in your 401(k), which is earning a moderate 7% annual rate of return on your investments. Because many employers offer matching 401(k) contributions, let's also say your employer will match that $3,000 per year, bringing your total investments to $6,000 annually.

By saving at that rate, you'll accumulate nearly $83,000 by age 65. By age 70 you'll have around $151,000 in your retirement fund. And if you continue saving diligently until age 75, you'll have approximately $246,000 socked away. Your chances of winning a quarter of a million dollars by gambling are pretty slim, but you do have a very real chance of saving that much if you invest your money in your retirement account.

Even if you're not spending thousands of dollars per year on lottery tickets or at the casino, nearly everyone can stand to save a little more. If you're not doing it already, start tracking your spending to find out exactly where your money is going, as well as to pinpoint the areas of your budget where you can cut back. Gambling may not be your particular vice, but perhaps you have a tendency to overspend on takeout, clothes shopping, vacations, or other nonessential splurges. You don't necessarily have to eliminate these costs entirely, but cutting back even a little and redirecting that money to your savings will pay off down the road.

Nobody is perfect, and most of us struggle with financial vices from time to time. But while some guilty pleasures are OK in moderation, if you're spending thousands of dollars per year on unnecessary (or even downright harmful) costs while neglecting your savings, that can spell serious trouble. However, by cutting back where you can and stashing more in your retirement fund, you can create healthier financial habits and build a strong nest egg to get you through your golden years. That's a sure bet.