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.