Apple has returned to the number three spot in the 67th Fortune 500 list of the largest corporations, though it fared less well in a new Fortune diversity ranking.

The Fortune 500 is a ranking of the largest companies in the U.S. by revenue. In 2019, Apple lost its third-place spot to Exxon Mobil. Apple regained that position in 2020, however, clocking in behind Walmart and Amazon.

Apple had $275 billion in revenue and $57.4 billion in profit throughout 2020, an all-time revenue record for the Cupertino tech giant. Fortune notes that Apple’s fiscal performance helped its stock soar 80.7% in the pandemic-stricken year.

Although Apple had its own set of challenges throughout 2020, the company continued to report record-breaking revenues across its product lineup. The iPad and Mac, in particular, fared well because of a work-from-home and remote education environment.

“The pandemic created challenges and opportunities for Apple. CEO Tim Cook had to close stores and send home engineers,” Fortune wrote. “But with Apple customers worldwide working and learning from home, iPad and Macintosh computer sales skyrocketed to their highest levels ever.”

Amazon ranked second with $386 billion in annual sales in 2020, while Walmart came in first with $559 billion.

Apple ranked much lower in a new Fortune “Measure Up” initiative, which ranks companies based on their level of diversity. The new list is based on 14 metrics, including availability of day care services and the percentage of minorities among a company’s managers.

The Cupertino tech giant came in 188th place. Although Apple’s own diversity data shows improvement compared to past years, there are still diversity gaps in areas such as leadership.

Stay on top of all Apple news right from your HomePod. Say, “Hey, Siri, play AppleInsider,” and you’ll get latest AppleInsider Podcast. Or ask your HomePod mini for “AppleInsider Daily” instead and you’ll hear a fast update direct from our news team. And, if you’re interested in Apple-centric home automation, say “Hey, Siri, play HomeKit Insider,” and you’ll be listening to our newest specialized podcast in moments.