Like millions of Americans, I watched the moon eclipse the sun on Monday (which ironically stems from the phrase "moon's day"). The next full solar eclipse visible throughout much of the U.S. won't happen until 2045.

When such rare opportunities arise, take advantage of them. I think that's what Warren Buffett is doing -- from an investing perspective rather than an astronomical one. Buffett is making what could be a once-in-a-generation bet on two stocks.

Buffett's big bets

Over $29 billion of Berkshire Hathaway's portfolio is invested in two similar stocks. Chevron (CVX 0.27%) ranks as Berkshire's fifth-largest position. Occidental Petroleum (OXY 0.66%) comes in one spot behind it. Both companies are major oil and gas producers.

Buffett continues to scoop up shares of Chevron and Occidental. In the fourth quarter of 2023, he purchased only three stocks for Berkshire's portfolio. Both of these oil stocks were in the group. The obvious question is: Why?

Perhaps Buffett expects that oil prices will rise soon. Even if he does, though, I don't think that's the primary reason behind the aggressive buying of Chevron and Occidental. While Buffett's nickname is "the Oracle of Omaha," he knows he can't predict the future. He stated as much in his latest letter to Berkshire Hathaway shareholders, writing: "No one knows what oil prices will do over the next month, year, or decade."

Buffett is instead making a calculated bet on two things with his investments in Chevron and Oxy. First, he believes the demand for oil and gas will remain strong despite the increased use of renewable energy. Second, he thinks that carbon capture technology could be a game-changer. The former isn't a once-in-a-generation wager, but the latter is.

How much could these bets pay off?

The idea behind carbon capture is that carbon dioxide emissions can be captured and stored. There are also some uses for carbon dioxide, including injecting it into oil fields to enhance oil recovery.

Occidental has trumpeted its investments in carbon capture and storage technology. In particular, the company is focusing on direct air capture, an approach where carbon dioxide is sucked from the atmosphere. Chevron is also investing heavily in carbon capture. The giant oil and gas producer hopes to capture 25 million metric tons of carbon dioxide annually by the end of this decade.

ExxonMobil projects that carbon capture and storage could be a $4 trillion business by 2050. Companies in industries such as cement production (the second-largest carbon dioxide emitter in the world) could pay big bucks to have their carbon emissions captured and stored underground.

But for Chevron, Occidental, and other oil companies, there's an even bigger prize: Staying in business indefinitely. Occidental CEO Vicki Hollub wants to sell oil that has net-zero carbon emissions. She told NPR last year: "If it's produced in the way I'm talking about, there's no reason not to produce oil and gas forever."

Should you buy Chevron and Occidental too?

If carbon capture achieves its potential, Buffett's big bets on Chevron and Occidental should pay off massively. Should you buy these stocks too?

Before you put your hard-earned money on the line, understand that carbon capture isn't a fully proven technology yet. It's possible that carbon capture won't be able to scale as much as needed to become the multi-trillion-dollar market ExxonMobil predicts.

That said, I think Chevron and Occidental are great stocks to buy for investors willing to take a chance on carbon capture. And while Buffett is right that no one can know for sure what oil prices will do, I won't be surprised if rising oil prices propel both of these stocks higher over the next few years.