Shares of General Dynamics (NYSE:GD) and Northrop Grumman (NYSE:NOC) have both more than doubled over the past five years, thanks to a truce in the partisan Washington budget battles and increased demand from an ever more dangerous world. But both stocks head into earnings season in the doldrums, with Northrop Grumman flat for the year and General Dynamics actually down 5%.

Is the recent performance an indication that defense stocks have peaked, or is this just a temporary lull that could provide a buying opportunity for long-term holders? Here's a look at where things stand for General Dynamics and Northrop Grumman, with an eye toward determining which, if either, is a better buy today.

Company

Market Cap

TTM Revenue

TTM P/E Ratio

TTM P/S Ratio

TTM Dividend Yield

General Dynamics

$56.91 billion

$31.07 billion

19.70

1.83

1.79%

Northrop Grumman

$54.76 billion

$26.13 billion

26.20

2.10

1.30%

Data source: Yahoo! Finance. Data as of July 11, 2018. TTM = trailing-12-month; P/E = price-to-earnings; P/S = price-to-sales.

Uneven performance

General Dynamics is a maker of tanks, warships, ordinance, and other weaponry; thanks to its $9.6 billion acquisition of CSRA earlier this year, it's now also one of the largest providers of IT services to the federal government. The timing is right to grow the IT unit, as the two-year budget deal signed earlier this year is expected to unleash significant pent-up demand for IT modernization put on hold during years of budget battles.

Virginia-class submarine at shipyard

A Virginia-class submarine comes off the line at General Dynamics' Electric Boat yard in Connecticut. Image source: General Dynamics.

The weapons business is performing well too. General Dynamics should be one of the chief recipients of extra Pentagon spending authorized in the budget compromise, with Congress committed to funding increased purchases of GD-built submarines and Stryker ground vehicles. First-quarter operating earnings at GD's combat systems unit were up 9.3% year over year on 11.9% higher revenue. Similarly, its marine systems business saw operating income climb 14% from last year on revenue that was 5.2% higher.

What's not working at General Dynamics is its commercial business. GD is the parent of Gulfstream, a major player in a business-jet market that has not yet recovered from the 2008-2009 recession. Global sales of business jets are less than half of what they were in 2008, and that has eaten into results and caused the commercial aerospace division to weigh on the booming military business.

There are signs indicating a slow recovery of the business-jet market is underway, though an order uptick has been slow to materialize. In the first quarter of this year General Dynamics reported a book-to-bill ratio for its aerospace unit of just 0.77, down from 1.3 in the fourth quarter of 2017. Gulfstream also delayed initial deliveries of its G500 midsize jet from the current quarter to the last four months of the year.

Soaring to new heights

Northrop Grumman is a maker of aircraft, radar units, sensors, and electronics used on a variety of defense platforms, with the company recently placing a big bet on space via its $9.2 billion acquisition of Orbital ATK.

Northrop Grumman Global Hawk in flight

A Northrop Grumman RQ-4 Global Hawk drone in flight. Image source: Northrop Grumman.

The company is perhaps the most disciplined of the prime defense contractors, raising eyebrows in the industry after deciding not to participate in a number of competitions in which it was considered among the favorites, because management determined the expected returns would not justify the investment needed. But Northrop is still on the hunt for growth: In addition to buying Orbital, the company is rumored to be preparing to bid on a planned Japanese fighter jet, although it hasn't dabbled in fighters for nearly three decades.

Northrop, like General Dynamics, has significant exposure to areas of Pentagon focus. The company's signature project is its planned B-21 bomber, a platform it won over competing bids from Boeing and Lockheed Martin that should generate more than $80 billion in revenue over its lifespan. Northrop Grumman is also a leader in drone technology, manufacturing the Global Hawk and Triton systems, and contributes advanced electronics and sensors to a range of military planes and warships.

Thanks to the addition of Orbital, Northrop is predicting a 15% uptick in revenue this calendar year. But margins are expected to come down off of record highs in 2017 as the space business is absorbed. Moreover, Northrop CEO Wes Bush unexpectedly announced last week he would be stepping down at year’s end, adding an additional layer of uncertainty to a company that already had a lot on its plate.

The better buy is...

I've been touting General Dynamics as the best buy among defense primes all year, and I've seen nothing to change my mind now. Northrop is a well-run company with an attractive portfolio, but it is also trading near historical highs and will likely find it difficult to outperform its peers in the quarters to come.

In General Dynamics, thanks to the Gulfstream issues, you get a relative value compared to its rivals. GD trades at a 20% discount or more to the other U.S. primes in terms of earnings, and at least a 10% discount on a price-to-sales basis. The only justification for that discount is the business-jet unit, and a bet on a Gulfstream recovery, which in time could close that valuation gap, is the most straightforward path to outperformance among large defense contractors today.

If Gulfstream can gain altitude, so too will General Dynamics shares. GD is the better buy today.

Lou Whiteman has no position in any of the stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.