My grandmother wasn't one to gamble often. But when the lottery prizes reached their highest levels, she would give us a call -- I was a teen back then -- and say: "Give me some numbers!" It was fun for her, on occasion, to spend a dollar or two and dream of collecting the jackpot to share with her family.

She never won big, but this didn't disappoint her because she considered playing the lottery entertainment and not a serious route to wealth. When it came to wealth building, Grandma and Grandpa Cimino opted for long-term investing.

Still, back then in the 1990s and today, potential payouts from the lottery could appear very tempting. The idea of winning millions tomorrow by spending pocket change today may seem like a dream come true, and that's led to billions of dollars every year flowing from Americans' wallets into lottery ticket purchases. Meanwhile, some Americans stay away from the temptation and prefer pouring their money into stocks, bonds, or other assets -- even though these don't promise million-dollar returns in the blink of an eye.

So, now, before the next Powerball drawing, let's consider the lottery and investing: Which one really builds wealth?

Two friends cheer while looking at something on a laptop.

Image source: Getty Images.

The lottery versus investing

First, let's take a look at the popularity of the lottery versus investing in the stock market in recent times. About half of Americans play the lottery, and they spend $103 billion annually on tickets, according to Motley Fool Money research. That's $321 per capita in states that offer the lottery. Meanwhile, a much smaller percentage of Americans -- only 21% -- directly own stocks, Motley Fool data show.

Why has the lottery won this popularity contest so far? It's not that people don't like stocks or investing. Instead, the lottery might seem to be easier, the ticket -- excuse the pun -- to striking it rich overnight. But here's the reality: Playing the lottery generally doesn't lead to wealth. Most lottery players win zero dollars, Motley Fool research shows -- and the likelihood of winning Powerball is incredibly slim at 1 in 292 million. As we say in Florida, where I'm from, you're more likely to be struck by lightning than to score big in the lottery.

Even worse, spending on the lottery actually could get in the way of true wealth building. If you only invest a dollar here or there, this may not seem like a big deal at the moment, but it adds up over time -- and this amount spent on lottery tickets actually could have been put to work in other, more valuable ways.

How to grow $25 into $56,000

David Meier, a Motley Fool investment analyst, offered a great example in a recent interview with Investigate TV. If you took the $25 you might spend on Powerball tickets and scratch-offs every month and invested it in an S&P 500 index fund -- which has a track record of delivering an average annual return of 10% -- you could grow that to more than $5,000 after 10 years and more than $56,000 over 30 years.

And the great news is investing in an index fund is easy -- making it a solid option for both stock market experts and novices. These funds, such as the SPDR S&P 500 ETF Trust (SPY -0.64%), for example, replicate the composition of the index they track -- and this offers you instant exposure to a variety of quality stocks and the opportunity to benefit from their growth. Exchange-traded funds (ETFs), such as this one, trade daily on the market, meaning you can buy shares of them as you would buy a stock.

So, should you forget about the lottery? Of course, like my grandma, you still may opt to buy a ticket here or there for fun if your bills are paid, you have an emergency fund in place, and you've built an investment portfolio. But, when it comes to growing wealth, the lottery has shown itself to be a losing bet -- so go for the long-term investing route, which has proven its value time and time again.