Walmart (WMT  ) posted strong second-quarter results as it topped expectations by a significant margin on the top and bottom-line. Its stock was higher following its announcement, but it gave up these gains on management's cautious commentary. One standout from its report was the strong performance of its online sales division which grew by 97% on a year over year basis.

Inside the Numbers

Earnings per share for the quarter were $1.56 which was 22% above last year and above consensus expectations of $1.25 per share. Revenue increased by 5.6% to $137.7 billion which was above the consensus of $135.4 billion. In the U.S., revenue increased by 10% on a same-store basis after stripping out fuel. This marked Walmart's biggest earnings surprise in its history.

There were some clues in its previous quarter that the second-quarter would be strong as the company noted increasing volume as people were spending their stimulus checks. Additionally, it noted that in the first quarter, customers were spending more on lower-margin consumer staples items which were starting to change by the end of April. Therefore, Walmart noted strong demand for PCs, TVs, and other more expensive items with demand for household items returning to more normal levels.

One effect of the coronavirus was that the number of transactions decreased by 14%, but the amount per transaction increased by 27%. This reflects the shift in consumption from lower-priced items to higher-priced items, and people minimizing the number of trips they take to the store.

Much of its growth can be attributed to e-commerce sales. Walmart has been aggressively investing in this channel over the past couple of years and it paid off during the pandemic as it offered curbside pickup, same-day delivery, and package shipments. Walmart is also launching its own membership service, similar to Amazon (AMZN  ) Prime which it hopes will have similar effects in terms of increasing customer loyalty and leading to more transaction. Many investors were hoping that Walmart would announce when Walmart+ would be launching but the company didn't give any insight.

Stock Price Impact

Following its earnings report, Walmart's stock jumped 6% to hit new, all-time highs in premarket trading. However, the stock gave back these gains and was trading lower due to management's cautious commentary for the rest of the year. It attributed much of the increase in revenue due to stimulus and said the company would see a negative effect if Congress failed to reach an agreement on an extension of the CARES Act. It also noted some tapering off in consumer spending.

The company was also pessimistic about back to school shopping given that many schools won't be reopening or only a few days a week. In order to meet the demands of COVID-19, Walmart hired 400,000 additional workers to fulfill online orders, cleaning, and stocking shelves and spent an additional $1.5 billion.