Walmart (WMT 1.32%) had a good-news/bad-news fourth quarter, it revealed in its latest earnings release published on Thursday.

For the final quarter of its fiscal 2021, the monster retailer booked $152.1 billion in revenue, 7% higher on a year-over-year basis, to set its new all-time record. That was on the back of comparable-store sales that rose by nearly 9%. That top-line figure also exceeded the average analyst estimate of just under $148.5 billion.

As for the bottom line, the company flipped to a loss of almost $2.1 billion, against the $4.1 billion profit in the year-ago period. Several one-time charges affected this; on a per-share, adjusted basis, the company earned $1.38 for the quarter, up $0.01 from Q4 2020. Prognosticators following the stock, however, were collectively forecasting $1.51.

Walmart employee working in the produce aisle.

Image source: Walmart.

This did not dissuade Walmart from raising its dividend. On an annual basis, the payout will rise 2% to $2.20 per share, which is to be doled out in quarterly disbursements. That first $0.55 per share payment will be made on April 5 to stockholders of record as of March 19. This will be its 48th consecutive annual raise.

Walmart is also refreshing its share repurchase program; the new authorization covers up to $20 billion in such buys over the next two years.

For the entirety of fiscal 2022, the company estimates that on an adjusted basis, net sales are predicted to rise at a low single-digit percentage rate. Meanwhile, both operating income and per-share earnings should "be flat to up slightly."

Stocks generally trade on the near future, not the recent past, so it's not surprising that Walmart closed Thursday down by almost 6.5%, against the 0.4% decline of the S&P 500 index.