Fortune said Walmart, which had slipped to No. 2 behind Exxon Mobil, was able to "refocus on low prices" and attracted "frugal customers."
Revenue at Walmart reached $469.2 billion in 2012, topping Exxon Mobil, which came in at No. 2 with revenues of $449.9 billion
The top five included Chevron, Phillips 66 and investment firm Berkshire Hathaway.
Apple reached No. 6 while breaking into the Top 10 for the first time.
Also in the Top 10: General Motors Co., General Electric Co., Valero Energy Corp. and Ford Motor Co.
The magazine said Facebook had arrived, making it onto the list in 2012 with revenues of $5.1 billion, which put it at No. 482 on the list.
Toddler uninjured after being knocked over by Obama family dog
Florida bear attack: Black bear mauls woman's face