Pity Lockheed Martin (LMT -0.20%) shareholders. They just can't catch a break.

The defense contracting giant reported a mixed quarter on Monday. Sales exceeded expectations ($17 billion booked versus $16.9 billion predicted on Wall Street), and earnings missing estimates by only a penny ($6.52 per share earned, versus $6.53 predicted). What's more, the "miss" was caused by the fact that Lockheed recorded a $225 million loss -- about $0.61 per share -- connected to delays in a single "classified" aeronautics program. 

But for that charge, Lockheed Martin wouldn't have missed earnings by a penny at all. It would have beaten earnings by a whopping $0.60 a share. And yet, investors sold off Lockheed Martin stock by more than 3% Monday.

Infographic flow chart of the defense industry with icons representing rockets, helicopters, fighter jets and other hardware

Image source: Getty Images.

More on the numbers

Here's another thing: Even if you take Q2's "miss" at face value, Lockheed Martin expects to make up its missing penny in short order. Issuing new and improved guidance for the rest of this year, Lockheed predicted it will end 2021 with earnings of $26.70 to $27 per share -- about $0.30 ahead of previous guidance.

And even that is only the beginning.

As CFO Kenneth Possenriede clarified in a post-earnings conference call with analysts: "We're very comfortable with the [$225 million charge to earnings, which] ... is for the development portion of this program." Going forward, the company has revised its estimates of what development will cost to complete, and this "new estimate [has] that overrun embedded."

All of which seems to suggest that although Lockheed initially spent a bit more than it expected developing this "classified aeronautics program," it expects to get that money back later on by "embedding" it into the cost to complete the project.

Furthermore, Possenriede noted that after conducting "reviews with the customer ... we believe [development] will be successful ... and then ultimately will turn into production ... and it will be a good program for the Lockheed Martin Corporation."

Translation: Once development morphs into production, and sales of completed products, these products will generate a lot more money for Lockheed Martin than it lost in the development stage -- so that all will be well when it ends well.

Aside from that, Mrs. Lincoln, how was the play?

"But enough about the charge to earnings," you say. Aside from that, how did the rest of Lockheed's quarter go?

The answer is that the quarter went pretty darn well. Sales in Q2 2021 grew a modest 5% in comparison to Q2 2020, and earnings grew more than twice as fast as that -- up 12.6%. (And earnings would have grown 23% if not for the charge!)

In fact, every single segment of Lockheed Martin's business showed improvements in sales in Q2, and every segment except for aeronautics improved operating profit in Q2. Lockheed's space business in particular simply boomed, with sales up 10% year-over-year and profits rocketing 33%. Although still Lockheed's smallest business by profits, "space" definitely seems to have some momentum on its side.

Watch this space

That being said, space still bears watching.

Lockheed Martin attributed its profits improvement in the space business largely to two things. The profitability of its spy satellites business is one -- including its Next Generation Overhead Persistent Infrared satellites, or "Next Gen OPIR," and Space-Based Infrared System satellites, or "SBIRS," where Lockheed Martin is largely unchallenged. But Lockheed also credited "higher equity earnings" from its United Launch Alliance (ULA) joint venture with Boeing (BA -2.87%) for part of its improved space profits.

Anyone who has been watching the space industry the past several years, however, cannot help but have noticed the increasing number of government contracts that ULA has been losing to rival SpaceX, and the lower prices ULA has been bidding in order to capture the contracts it has won. The more business that SpaceX wins away from ULA, and the lower it forces ULA to price its rocket launches to compete, the more pressure Lockheed Martin's space business will face on the margins front.

This wasn't a problem for Lockheed in Q2, clearly -- but it may become a problem in the quarters to come.