While much of the stock market has faded into bear-market territory this year, one sector has stood out -- oil and gas. The energy sector, as represented by the Energy Select SPDR ETF (XLE -1.83%), has gained 48% this year, while the S&P 500 has shed 14%.

Exxon Mobil (XOM -4.12%), the largest component of the Energy Select SPDR ETF, is up 49% year to date. So, is it too late to buy ExxonMobil?

Oil and gas workers looking at a tablet computer.

Image source: Getty Images.

Let's talk about cash flow

Young companies focus on growth. They often lack profits, but investors tend to overlook that if the company shows promise of future growth that will -- one day -- lead to a healthy bottom line.

But for ExxonMobil, growth isn't necessarily the name of the game. Instead, ExxonMobil is what you'd consider a cash cow. It's a mature business that should generate ample profit and free cash flow, a financial metric representing how much cash a company generates.

XOM Free Cash Flow Per Share Chart

XOM Free Cash Flow Per Share data by YCharts.

As you can see in the above chart, ExxonMobil's free cash flow per share is at its highest level in 30 years. Its current level surpasses even the former highs reached during the oil shock of 2007 to 2008.

What's Exxon going to do with its new influx of cash?

Significant free cash flow allows a company to pay down debt, invest for the future, reward shareholders with hefty dividends, and repurchase its own shares.

With cash pouring into Exxon's coffers, the company has focused on two main cash management objectives:

  1. Increasing shareholder returns.
  2. Lowering its debt to capital ratio (total and net).

Concerning the first priority, Exxon distributed $5.8 billion to shareholders in the first quarter. It paid $3.8 billion in dividends and repurchased $2.1 billion of its shares. Moreover, management announced it was expanding its current buyback program to $30 billion.

XOM Debt To Capital (Quarterly) Chart

XOM Debt To Capital (Quarterly) data by YCharts.

As for the second objective, debt repayments were a relatively modest $0.7 billion. Nevertheless, Exxon's total debt to capital ratio fell to 21.4%, and its net debt to capital ratio (which incorporates cash on hand) fell to 17% as retained earnings grew.

The chart above shows that Exxon's long-term average debt to capital ratio is around 15.7%. As the company approaches this historical average, management should feel more confident about its balance sheet. In turn, Exxon's regular dividend may march higher.

Is it too late to buy Exxon?

With a price-to-earnings ratio of 17 and a dividend yield north of 4%, ExxonMobil oozes value. Oil and gas prices remain elevated, and many analysts expect prices to stay high -- or move even higher. Either way, Exxon looks attractive in a market that continues to shift away from growth and toward value.