NEW YORK (Reuters) - Walmart Inc WMT.N, the world's biggest retailer, on Tuesday posted a sharp drop in profit and online sales growth during the critical holiday period and forecast annual profit at the lower end of expectations.

Its shares fell 9.4 percent as investors worried that Walmart would not be able to keep pace with Amazon.com Inc AMZN.O, the world's biggest online retailer, as it struggles with managing its online business.

Even as comparable sales in the U.S. market rose for the 14th consecutive quarter, Walmart’s online sales grew 23 percent in the fourth quarter that included the holidays. In the same period a year ago, sales grew 29 percent, while online sales were up 50 percent in the third quarter.

It was also slower than Amazon’s North American sales growth of 40 percent during the holiday quarter.

Walmart’s online performance was hurt during the quarter as growth fueled by the purchase of Jet.com began to lessen and the retailer struggled to balance its online inventory, Chief Executive Officer Doug McMillon said on a conference call with investors.

While Walmart added more holiday merchandise like electronics, toys and gifts, it did not stock enough everyday items, which hurt sales.

Erik Gordon, a professor at the Ross School of Business at the University of Michigan, said Walmart’s trouble figuring out online inventory during the quarter raised questions about its preparedness to fight Amazon.

The company posted about $11.5 billion in U.S. e-commerce revenue for the year but lost money. McMillon expects e-commerce losses this year to be “about the same” as last year.

Analysts said the company’s price war with Amazon weighed on margins. In November, Walmart’s prices were within striking distance of matching Amazon’s for the first time.

FILE PHOTO: The logo of Walmart is pictured at a store in Monterrey, Mexico February 12, 2018. Picture taken February 12, 2018. REUTERS/Daniel Becerril

Walmart recently asked vendors to supply more merchandise priced at $10 and higher in a push to turn an online profit.

Walmart also said it is investing more in its website on a national basis and reducing marketing in Jet.com. The cost to market and acquire a new customer is cheaper with the Walmart brand nationally than for Jet, which targets high-income urban and millennial shoppers.

Walmart forecast earnings of $4.75 to $5 per share for the current fiscal year on a 2 percent increase in U.S. same-store sales. Analysts expected $5 per share for the same period.

Walmart also expects U.S. e-commerce growth for the fiscal year to be around 40 percent.

Excluding special items that crimped profits such as restructuring charges and an impact from offering a one-time bonus to employees, earnings came to $1.33 per share in the fourth quarter ended Jan. 31. The average analyst estimate was $1.37 per share, according to Thomson Reuters I/B/E/S.

Net income dropped 42.1 percent to $2.18 billion from $3.76 billion. Consolidated operating income fell 28 percent to $4.5 billion.

In January, the retailer said it would raise the minimum wage for hourly employees to $11 an hour and offered a one-time bonus to store employees as it benefited from the new U.S. tax law.

Sales at U.S. stores open at least a year rose 2.6 percent, excluding fuel price fluctuations, while the market expected a rise of 2 percent, according to Consensus Metrix. The retailer has recorded more than three straight years of U.S. growth, unmatched by any other retailer.

Total revenue increased 4.1 percent to $136.3 billion, beating analysts’ estimates of $134.9 billion.

The company estimated its tax rate would be between 24 percent to 26 percent in the current fiscal year after the new tax law reduced the corporate tax rate to as low as 21 percent.

“We are currently analyzing the accounting impact of the Tax Act, but our analysis is incomplete,” the company said in a statement. The retailer recorded a provisional benefit of $207 million for both the fourth quarter and full year.

The stock was down $9.43 to $95.35.