When investors look at a stock's performance, the starting and ending dates can be very important. For example, over the past three years, Occidental Petroleum (OXY 1.31%) has looked like an industry standout. However, if you change the time frame, going just a little longer in this case, the story starts to change. Here are some numbers you'll want to look at before you buy Occidental Petroleum.

The good number

Over the past three years, a $10,000 investment in Occidental Petroleum, or Oxy as it is more commonly called, would have turned into roughly $41,000. That's a pretty impressive result, especially when you compare it to an S&P 500 Index ETF, which would have increased in value to $14,700, or an energy industry giant like Chevron (CVX 1.57%), which turned $10k into a touch under $20k. These are stock-only returns, which don't include dividend reinvestment.

OXY Chart.

OXY data by YCharts.

If you look at total return, Oxy's numbers don't change much because its dividend is fairly modest. In fact, it was just a token penny a share for roughly half the period. So dividend reinvestment only added another $650 or so to the total increase in value of that $10,000 investment, bringing it to $41,650. Reinvesting Chevron's higher and more stable dividend increased $10,000 to $22,850. The S&P 500 Index, meanwhile, would have seen $10,000 grow to $15,400 over the past three years with dividends reinvested. 

OXY Chart.

OXY data by YCharts.

More to the numbers

Oxy's dividend is actually an important factor, even though it doesn't add much to the return over the past three years. Notably, it was cut from $0.79 per share per quarter to just $0.01 in 2020. It didn't start growing again until the second quarter of 2022. After two increases, it is only up to $0.18 per share per quarter, which is still far below where it was prior to the cut. 

If you don't take the time to dig in a little here, you might assume that the dividend was cut because of the energy downturn in 2020, driven by a demand decline as economies around the world shut to slow the spread of COVID-19. That's true to some extent, but far from the full picture. What really happened was that management inked an ill-timed, financially aggressive, and debt-funded acquisition in 2019 that it simply couldn't afford when energy prices went south. 

OXY Debt-to-Equity Ratio Chart.

OXY Debt to Equity Ratio data by YCharts.

Given the fact that the dividend is nowhere near the pre-cut payment, you could argue that the company is still working to resolve the aftereffects of the merger. For example, Oxy's debt-to-equity ratio is around 0.63 times today, even after a huge improvement in oil prices. That compares to 0.15 times for Chevron. So the astute investor would be wondering what happens to the performance numbers if you pull back to before the acquisition.

OXY Chart.

OXY data by YCharts.

Over the past five years, a $10,000 investment in Oxy would have turned into $9,150 on a stock-only basis and around $10,500 when looking at total return. The same investment in Chevron would have turned into $14,450 on a stock-only basis and just under $18,000 including dividend reinvestment. From this perspective, Oxy goes from a standout performer to treading water.

Clearly, timing matters. However, not even the best investors in the world know the exact right time to buy a stock. To highlight this point, Warren Buffett's Berkshire Hathaway helped Oxy get its ill-timed deal over the finish line with the purchase of preferred shares. It is unlikely that Buffett knew in advance that the outcome would be so bad for so long.

Safety first

The energy sector is highly cyclical, so playing it safe is probably a good call. That favors a conservatively managed industry giant like Chevron over a more focused and aggressive player like Oxy. But you have to consider multiple periods of time, performance-wise, to see how the slow and steady approach has won out.