After carefully negotiating its way out of an industrywide railroad strike, Union Pacific (UNP 0.99%) steams ahead into 2023. The Omaha-based rail carrier posted record 2022 earnings last month amid a challenging operating environment. 

Let's take a look at recent performance and full-year results to determine if this railroad stock is a buy.

Record earnings for Union Pacific

Fourth-quarter revenue climbed 8% year over year thanks to higher fuel surcharge revenue, strategic price increases, and demand growth. Also helping to drive revenue in Q4 was Union Pacific's fuel consumption rate, which improved 2%.

In fact, Union Pacific has improved its fuel consumption rate for four straight years. Last quarter, thanks largely to locomotive modernizations, was the most fuel efficient the railroad has ever been. A more efficient fleet not only reduces Union Pacific's carbon footprint but also makes for a more productive and reliable operation.

Union Pacific railway workers inspect a track.

Image source: Union Pacific.

For the year, Union Pacific enjoyed a 14% rise in revenue vs. 2021, the result of fuel surcharges, robust pricing gains, and 2% volume growth. 2022's operating income of $9.9 billion set a new company record, and earnings per share closed the year at a record $11.21, a 13% year-over-year increase.

Most importantly, Union Pacific broke its record for net income in 2022, delivering nearly $7 billion in profit for the year. Considering that operating expenses endured a 20% increase vs. 2021, record profits are exceptionally impressive this year.

Revenue growth hampered by higher expenses, inflation

Amid strong demand, Union Pacific faced heightened costs, inflationary pressures, operational inefficiencies, and weather challenges in 2022. And while Union Pacific reported record annual profit last year, CEO Lance Fritz soberly stated, "The entire Union Pacific team recognizes that 2022 did not beat expectations."

Crew shortages particularly impacted operations in 2022, resulting in higher overtime costs and the added expense of "borrow outs," or utilizing rail workers from other organizations to supplement shortfalls.

According to Fritz, "Crew constraints in critical locations impacted by shifting demand had a real impact on our performance." As a result, Union Pacific's revenue growth was "more than offset" by a combination of crew-related operational inefficiencies and high inflation.

Fully recognizing its weaknesses, Union Pacific focuses on recovering its network through hiring efforts and the reallocation of critical resources. With 600 employees currently in training, Union Pacific's hiring pipeline is "significantly stronger than it was a year ago," according to Executive Vice President Eric Gehringer.

Looking ahead

Union Pacific anticipates current hiring initiatives to continue this year, along with progressive improvements across its network. Once fully in place, these enhancements should reclaim the railway's lost productivity.

As for the year ahead, Union Pacific's Chief Financial Officer Jennifer Hamann seeks to best manage what the company has control over. While inflation is out of Union Pacific's hands, she claims "we know we have it within our control to improve operations." She expects that continued improvements will ultimately drive revenue that outweighs the cost of inflation.

Hamann later added, "Growth is the cornerstone to the long-term financial success of Union Pacific and we are continuing to invest in opportunities that support that strategy." 

Is Union Pacific stock a buy in today's market?

From its all-time high of nearly $280 in March 2022, Union Pacific stock dropped 25% to its current price range around $209. Meanwhile, the railroad is breaking records for annual operating revenue, operating income, net income, and earnings per share. And according to Yahoo! Finance, Union Pacific is estimated to grow at an annual rate of over 9% per year for the next five years. With an ever-improving workforce and more efficient railway network, I think it's time to buy the dip on Union Pacific stock.If the company executes its network recovery initiatives as expected, record earnings could eventually translate into record-high stock prices.