New York CNN Business  — 

In 2021, ExxonMobil posted its largest profit in seven years, as soaring energy prices added more than $100 billion in revenue to the company’s top line.

The nation’s largest oil company earned $23 billion for the year, compared to a loss of $1.4 billion, excluding special items, in 2020. The pandemic’s widespread stay-at-home orders and business shutdowns caused demand for oil to plunge, briefly resulting in negative oil prices in early 2020.

Exxon’s fourth-quarter income of $8.8 billion was about $500 million more than analysts surveyed by Refinitiv had forecast.

Prices for oil, natural gas and petrochemicals all soared in 2021, allowing ExxonMobil to report revenue of $285.6 billion, up from $181.5 billion in 2020. Revenue in the fourth quarter of $85 billion was up 83% from a year earlier and up 15% from the third quarter of 2021.

Oil prices have soared this year as OPEC and some other oil producers such as Russia have limited production. Meanwhile, US production was partly limited by widespread bankruptcies across the sector in 2020, and partly by oil drillers being cautious about pumping more oil after the glut in 2020 crashed prices.

Energy demand has since soared on a strong rebound in economic activity. US economic activity as measured by gross domestic product had its biggest annual gain since 1984.

ExxonMobil’s full-year earnings was the best for the company since 2014, but it was the $104 billion jump in revenue in one year that was particularly notable. It is a sign of how high oil and natural gas prices have lifted the entire sector.

The company announced it would use its windfall to start a $10 billion share repurchase program. Shares of ExxonMobil were slightly higher in premarket trading. Shares are up 24% so far this year through Monday’s close and up 84% since the start of 2021.