Powerball Flickr Daniel Oines
This week's projected $1.5 billion jackpot put most Powerball payouts to shame. Image: Flickr user Daniel Oines.

Millions of Americans flocked to buy tickets for the Powerball lottery, with its estimated $1.5 billion jackpot set to eclipse old records for its payout. Yet even the most ardent supporters of lottery playing will admit that your odds of winning the big prize are extremely remote. As a backup plan just in case you didn't emerge the winner, take a look at three stocks that have produced huge, almost lottery-like profits for those who bought them for the long haul.

Apple
The rise of Apple (NASDAQ:AAPL) has been impressive, but it has come in two separate waves. During the tech boom of the 1990s, Apple came to prominence because of its personal computer lines, which appealed to individual consumers looking for a more personalized technology experience. The departure of Steve Jobs and the tech bust in the early 2000s sent Apple to the brink, but the innovation of the iPod and the resulting consumer-electronics revolution that brought the iPhone, iPad, and Apple Watch to millions of people worldwide sent Apple shares soaring once again.

Investors in Apple 30 years ago have seen their shares rise at a better than 20% annualized pace, resulting in gains that have turned an original $1,000 investment into about $285,000. Moreover, shares are attractively valued now, and the dividends they pay will keep investors rewarded far into the future. Unlike a lottery ticket, which pays off only once -- if at all -- Apple should give investors a return on their investment well into the future.

Home Depot
The retail industry is a tough one, and it's hard to find a lasting edge in the ultra-competitive environment. But home-improvement specialist Home Depot (NYSE:HD) has done an exceptional job in carving out an initial niche in serving the do-it-yourself homeowner customer segment and then expanding to cover professional contractors as well. In weak housing markets, Home Depot has focused on helping customers make the most of their existing properties, while the retailer has taken advantage of strong housing markets to encourage major renovations and construction projects. All along, efforts to modernize its offerings and give more choices to consumers have paid off, and an emphasis on efficiency has widened profit margins and boosted share-price growth.

If you had invested $1,000 in Home Depot 30 years ago, your shares would now be worth more than $700,000. Moreover, even with a modest dividend yield of around 2%, you'd be getting almost $14,000 in annual income -- 14 times your original investment, year in and year out. Home Depot has weathered past housing cycle downturns and looks prepared to handle whatever the future brings.

Altria Group
Tobacco giant Altria Group (NYSE:MO) has an amazing story of resiliency. Surviving product liability lawsuits, regulatory attempts to curtail its business, and consumer groups attacking its marketing strategies, Altria has consistently grown its share price and kept its dividend payments rising. Even as cigarette sales volumes have fallen in the wake of a reduction in the popularity of smoking, Altria has countered by using its pricing power to offset sales declines and widen profit margins.

Long-time investors in Altria have truly hit the jackpot, with 20% average annual returns over the past 45 years turning an initial $1,000 investment into roughly $3 million, based on the way that Yahoo Finance calculates the impact of corporate spinoffs and dividends. Efforts to develop new markets in electronic cigarettes and Altria's exposure to the beer industry through its ownership stake in SABMiller give the company a possibility of continuing its past growth trajectory.

Playing the lottery is a reasonable form of entertainment, especially when the jackpot is this high. But if you want a more realistic way to make money, investing for the long run in stocks with solid prospects is a better way to go. Whether you like the future that these three stocks have or prefer others, the experiences that shareholders in these companies have seen should inspire you to match their success.

Dan Caplinger owns shares of Apple. The Motley Fool owns shares of and recommends Apple. The Motley Fool recommends Home Depot. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.