The Beginner’s Guide to Investing

If you invested $1,000 in Walmart in 2009, here's how much money you'd have now

Here's how much a $1,000 investment in Walmart 10 years ago would be worth...

Retail giant Walmart reported fiscal first-quarter earnings Thursday that beat analysts' expectations. Its shares closed up 1.4% at $101.31 after the company reported an adjusted quarterly profit of $1.13 per share, 11 cents a share above Wall Street forecasts.

If you invested in Walmart 10 years ago, that decision would have paid off. A $1,000 investment made on May 16, 2009, would be worth more than $2,700 as of midday May 16, 2019, for a total return just more than 175%, according to CNBC calculations.

Over the same period, the S&P 500 returned 227%.

Sales at U.S. Walmart stores (open for at least 12 months) were up 3.4%, the biggest increase for the first quarter in nine years, according to the retailer. Analysts predicted growth of 3.3% according to figures from financial markets data provider Refinitiv.

CNBC: Walmart stock as of May 16, 2019.

E-commerce sales grew 37%, versus 33% last year. Overall, Walmart shares are up 18% from this point a year ago, bringing the retailer's market cap to a whopping $290 billion. By comparison, Amazon shares grew 19% over the same period, while Target's stock is down 3%.

While Walmart's stock has mostly done well over the years, any individual stock can over- or underperform and past returns do not predict future results.

The company's revenue came in below expectations, however: $123.93 billion versus $125.03 billion. Some industry experts are worried that the possibility of additional tariffs could hurt sales.

The White House released a list early this week of about $300 billion in Chinese goods that President Donald Trump could hit with tariffs as high as 25%. That includes clothing, sporting goods and other accessories.

"Increased tariffs will increase prices for customers," Walmart's chief financial officer, Brett Biggs, said Thursday, but added that the company is "hopeful that an agreement can be reached" between the U.S. and China.

Walmart CFO to CNBC: Increased tariffs will increase prices

"As we have said before, our goal is to be the low-price leader," he said. "We want to manage margins with customers and shareholders in mind." And, he added, "we have mitigation strategies that have been in place for months."

The retailer has been spending big to add new merchandise, fulfill online orders faster, and make more stores capable of packing and delivering online grocery orders. The company is aiming to offer pickup for online groceries at 3,100 stores and same-day grocery delivery from 1,600 locations by the end of the year.

"We're continuing our transformation to become more of a digital enterprise," Walmart CEO Doug McMillon said Thursday in a statement.

And analysts at investment banking company Jefferies are optimistic about the company's future, saying in a note that Walmart's investments in new tech and e-commerce "have positioned it well for future share gains."

If you're looking to get into investing, seasoned investors such as Warren Buffett suggest you start with index funds, which hold every stock in an index, meaning they're automatically diversified and tend to be low cost. Plus, because they fluctuate with the market, they're typically less risky than picking individual stocks.

Here's a snapshot of how the markets look now.

Don't miss: If you invested $1,000 in Netflix in 2007, here's how much you'd have now

Like this story? Subscribe to CNBC Make It on YouTube!

Investing in these stocks would have made you rich by now—here are other ways to invest your money