Canadian National Railway Company (TSX:CNR)(NYSE:CNI) and Canadian Pacific Railway Limited (TSX:CP)(NYSE:CP) are the two largest railway companies in Canada, and both of their stocks represent great long-term investment opportunities.

However, the laws of diversification clearly state that we cannot own both, so let’s compare the companies’ financial performances in the first quarter, their stocks’ valuations, and their dividends to determine which is the better buy today.

Canadian National Railway Company

Canadian National is the largest rail network operator in Canada. Its stock has risen over 1% year-to-date, including a decline of about 5% since it released its first-quarter earnings results after the market closed on April 25. Here’s a breakdown of 10 of the most notable statistics from the report compared with the year-ago period:

  1. Net income increased 12.5% to $792 million
  2. Diluted earnings per share increased 16.3% to $1.00
  3. Revenue decreased 4.3% to $2.96 billion
  4. Carloads transported decreased 7.2% to 1.26 million
  5. Rail freight revenue per carload increased 2.9% to $2,267
  6. Operating income increased 14.5% to $1.22 billion
  7. Operating ratio improved 680 basis points to 58.9%
  8. Net cash provided by operating activities increased 7.4% to $1.07 billion
  9. Free cash flow increased 12.1% to $584 million
  10. Weighted-average number of diluted shares outstanding decreased 3.1% to 789 million

At today’s levels, Canadian National’s stock trades at 17.3 times fiscal 2016’s estimated earnings per share of $4.55 and 15.9 times fiscal 2017’s estimated earnings per share of $4.93, both of which are inexpensive compared with its five-year average price-to-earnings multiple of 17.7 and the industry average multiple of 21.2.

In addition, Canadian National pays a quarterly dividend of $0.375 per share, or $1.50 per share annually, which gives its stock a yield of about 1.9%. It is also important to note that the company has increased its annual dividend payment for 19 consecutive years, and its 20% hike in January has it on pace for fiscal 2016 to mark the 20th consecutive year with an increase.

Canadian Pacific Railway Limited

Canadian Pacific is the second-largest rail network operator in Canada. Its stock has risen over 3% year-to-date, including a decline of over 3% since it released its first-quarter earnings results on the morning of April 20. Here’s a breakdown of 10 of the most notable statistics from the report compared with the year-ago period:

  1. Adjusted net income increased 2.4% to $384 million
  2. Adjusted earnings per share increased 10.6% to $2.50
  3. Revenue decreased 4.4% to $1.59 billion
  4. Carloads transported decreased 4.4% to 614,000
  5. Rail freight revenue per carload decreased 0.8% to $2,520
  6. Operating income increased 6.7% to $653 million
  7. Operating ratio improved 430 basis points to 58.9%
  8. Cash provided by operating activities decreased 60.7% to $218 million
  9. Reported a cash use of $71 million, compared with free cash of $312 million in the year-ago period
  10. Weighted-average number of diluted shares outstanding decreased 7.5% to 153.8 million

At today’s levels, Canadian Pacific’s stock trades at 16.5 times fiscal 2016’s estimated earnings per share of $11.06 and 14.7 times fiscal 2017’s estimated earnings per share of $12.45, both of which are inexpensive compared with its five-year average price-to-earnings multiple of 27 and the industry average multiple of 21.2.

In addition, Canadian Pacific pays a quarterly dividend of $0.50 per share, or $2.00 per share annually, which gives its stock a yield of about 1.1%. It is also important to note that the company’s 42.9% dividend hike earlier this month has it on pace for fiscal 2016 to mark the first year in which it has raised its annual dividend payment since 2012.

Which is the better buy now?

Here’s how each company ranks when comparing their earnings results, their stocks’ valuations, and their dividends:

Metric Canadian National Canadian Pacific
Q1 Earnings Strength 1 2
Forward P/E Valuations 2 1
Dividend Yield 1 2
Dividend Growth 1 2
Average Ranking 1.25 1.75

As the chart above depicts, Canadian Pacific’s stock trades at more attractive forward valuations, but Canadian National reported stronger first-quarter earnings results and it has a much better dividend, giving it the edge in this match-up.

With all of this being said, I think both railways represents great long-term investment opportunities today, so Foolish investors should strongly consider making one of them a core holding.

Motley Fool issues rare "double down" stock alert

Not to alarm you but you recently missed an important and rare event. Stock Advisor Canada issued a "double down"... and history suggests it pays to listen. Because 10 of the most lucrative "double downs" in one of the Motley Fool's premier services skyrocketed an average of 434%! So, simply click here to discover why Motley Fool "double downs" have some investors rocking with excitement. Five years from now, you'll wish you'd grabbed this stock. Click here to learn more.

NEW! This Stock Could Be Like Buying Amazon In 1997

For only the 5th time in over 14 years, Motley Fool co-founder David Gardner just issued a Buy Recommendation on this recent Canadian IPO.

Stock Advisor Canada’s Chief Investment Adviser, Iain Butler, also recommended this company back in March – and it’s already up a whopping 57%!

Enter your email address below to claim your copy of this brand new report, “Breakthrough IPO Receives Rare Endorsement.”

Fool contributor Joseph Solitro has no position in any stocks mentioned. David Gardner owns shares of Canadian National Railway. The Motley Fool owns shares of Canadian National Railway. Canadian National Railway is a recommendation of Stock Advisor Canada.