Since the start of 2020, ExxonMobil's (XOM -0.09%) stock has soared 50%, compared to a 22% gain by the S&P 500, and is up 72% year to date. Yet the oil giant just announced a new corporate plan to launch a massive $50 billion stock buyback program even as analysts worry a looming recession may depress demand for oil that has slumped to around $70 a barrel.

With Exxon's shares trading just below their all-time high, investors rightly want to know whether now is the time to be spending all this money on its stock .

Oil rig and barrel sitting on paper money.

Image source: Getty Images.

How share purchase programs benefit you

Companies have a choice on how they can share their success with their investors: They can pay dividends, or they can buy back stock.

Exxon is enjoying record profits this year. It generated $19.7 billion in earnings in the third quarter, $4 billion more than Wall Street was anticipating and almost the same as the $20.7 billion that Apple (AAPL -0.57%) generated. 

It pays a quarterly dividend of $0.91 per share, a 3% increase over last year. It has raised the payout for 40 consecutive years, making it a Dividend Aristocrat.

Stock buybacks reduce the number of shares a company has outstanding. As a result, each remaining share represents greater ownership of the company. After suspending its buyback program in 2021, it announced a $10 billion program in January that it completed in the third quarter. Now it's going to turbocharge that with a $50 billion repurchase plan.

Will the buybacks be effective?

If Exxon were to begin buying up its shares today, it would be paying some of the highest prices for them -- but that's not the whole picture. Shares go for just 8 times trailing earnings and 9 times next year's estimates, some of the lowest valuations in the last 30 years.

XOM PE Ratio Chart

XOM PE Ratio data by YCharts

They're also going for just a fraction of their long-term earnings growth rate, and analysts forecast Exxon will be growing profits at 25% a year for the next five years.

Where Exxon plans to go

Buying back a ton of stock is not the only thing on Exxon's agenda. It believes profits and cash flows will double by 2027, as it plans to spend between $20 billion and $25 billion annually on capital expenditures. It also intends to keep production at roughly 3.7 million barrels of oil equivalent a day next year using an assumed oil price of $60 per barrel. 

Exxon had 4.1 billion shares outstanding at the end of the third quarter. With a price of around $103 per share as of this writing, it could buy back almost half a billion shares, for an 11% reduction in the number of shares.

The oil giant continues to invest in new projects, such as those in the Permian Basin and Guyana. It is also making significant investments in liquefied natural gas (LNG) export facilities globally.

With CEO Darren Woods forecasting LNG shortages in Europe for several years to come, Exxon finds itself perfectly positioned to capitalize on the heightened demand. 

While there will be pressures on ExxonMobil as demands for alternative energy sources grow, this stock buyback signals an excellent time to scoop up its shares.