There wasn't much of a question about whether Walmart (WMT -0.08%) would post strong sales growth in the fiscal second quarter. Peers around the industry, from Kroger to Costco, had announced elevated demand in recent months as people continued to stock up on consumer staples during the coronavirus pandemic. The retailing giant showed in its prior earnings report that it could win market share in that environment, in part thanks to its robust multichannel selling platform.

Walmart this week confirmed many of those positive trends. In fact, it managed nearly as fast a growth pace in the months of May, June, and July as it did during peak social-distancing efforts in March and April.

Let's take a closer look.

A man shops for beer.

Image source: Getty Images.

Growth gains

Sales gains slowed slightly from quarter to quarter, as expected, with comparable-store sales growth landing at 9.3% in the core U.S. market versus 10% three months ago. But looking behind that headline figure reveals some major shifts in the business. Walmart's customer traffic plunged 14% versus just a 6% drop in the prior quarter that included the beginning of the pandemic.

The chain made up for that collapse by selling far more merchandise with each visit as average spending soared 27%. Walmart also got a bigger contribution from the e-commerce division, which was responsible for 6 percentage points of overall growth this quarter compared with 4 percentage points in fiscal Q1. Executives said in an investor presentation that standout categories included home furnishings, electronics, and apparel, while the grocery segment grew with support from pickup and delivery services.

Margins bounce back

Investors got some more positive news on the earnings front. While COVID-19 related costs like labor jumped in the period, Walmart benefited from free spending on the part of shoppers in high-margin, consumer-discretionary categories.

This eagerness to shop was supported by federal stimulus payments and reduced the need for the type of price cuts that harmed profitability last quarter. As a result, adjusted operating income jumped 17% to $5.4 billion. Operating margin made a rare jump higher.

WMT Operating Margin (TTM) Chart

WMT Operating Margin (TTM) data by YCharts. TTM = trailing 12 months.

The uncertain future

The chain is heading into the second half of 2020 in a difficult inventory position that suggests out-of-stock issues could limit its growth opportunities. Meanwhile, a second stimulus measure isn't guaranteed to pass, which means Walmart could see a quick return to value-based shopping, especially given rising unemployment and worsening economic growth rates.

These risks mean that there's an unusually wide range of results investors might see from the retailing titan during the holiday shopping period. For its part, Walmart's management team seems to be taking a conservative posture by declining to issue a growth outlook and by halting spending on stock repurchases.

CEO Doug McMillon and his team instead directed those resources toward paying down debt in Q2. The move should keep Walmart's options open as it navigates through a likely volatile (and competitive) second half of the fiscal year.