Exxon Mobil on Friday posted quarterly earnings that easily beat expectations and showed a small increase in fossil fuel production, reversing a trend of declining output.

The stock price for the world's largest publicly traded oil and gas company was up more than 3 percent at nearly $76 a share. Shares earlier jumped by about 4 percent.

Exxon earned a quarterly profit of $6 billion including the impacts of U.S. tax changes, down 28 percent from a year ago. That pencils out to earnings per share of $1.41, beating Refinitiv forecasts for $1.08 per share.

Excluding tax impacts, the company earned $6.41 billion for the quarter, marking a 72 percent increase from the same period a year ago.

Revenue came in at $71.89 billion, well below expectations for $77.28 billion from Refinitiv.

Exxon grew its total production of oil, natural gas and other hydrocarbons slightly, hitting 4 million barrels of oil equivalent in the quarter.