Investors were in a forgiving mood this week, and that was good news for defense company Lockheed Martin (LMT 0.30%) -- because the company's Q2 2022 earnings report, released Tuesday, was bad with a capital "B".

Expected to report $6.39 per share in "adjusted" profits on sales of more than $16 billion, Lockheed missed analysts' earnings forecast by $0.07 -- and missed the sales forecast by $600 million. Nevertheless, Lockheed stock closed up a fraction of a percent for the day, and gained even more on Wednesday. 

But did Lockheed Martin stock deserve to go up at all?

Lockheed by the numbers

Year over year, Lockheed Martin's sales declined nearly 10% to just $15.4 million -- hardly the result you'd expect for a major defense contractor doing business in the middle of a shooting war in Europe.

Operating profits fell more than 10%, and burdened by a big pension settlement charge and charges for "performance issues on a classified program," net income plunged 82% to just $1.16 per share on a GAAP basis. On the plus side, free cash flow improved by 8% year-over-year, and the company generated positive cash profits of $1 billion.

CEO James Taiclet accentuated this single positive point from the earnings release, noting that "Lockheed Martin continued to deliver strong and consistent cash generation" in Q2. At the same time, he waved away concerns about declining revenue as the effect of "supply chain impacts and the timing of customer contract negotiations", and assured investors that profit margins increased despite the decline in revenues.

Which is true. In fact, Lockheed's biggest business division -- aeronautics, with $5.9 billion in sales for the quarter -- saw its profit margins increase by 180 basis points to 10.4%, while the company's smallest but most profitable division, missiles and fire control ($2.7 billion in sales), got even more profitable, growing its margins 160 basis points to 15.2%. On the other hand, rotary and mission systems profits ($4 billion in sales) slipped 80 basis points to 10%. Last and least, Lockheed's space division ($2.8 billion in sales) lost a full percentage point in profit margin, falling to 9.5% -- making "space" now Lockheed's least profitable business.

Overall, that averaged out to an 11% operating profit margin for the quarter -- up 60 basis points year-over-year -- despite falling sales and falling profits.

Big picture, bad picture

So, good for Lockheed Martin on that score. There's just one problem: The margins won't last.

As management segued from reporting on Q2 results to giving guidance on what it expects to report over the remainder of the year, it became clear that profit margins are in trouble. Cutting revenue projections by about 1%, Lockheed Martin now expects full-year sales to come in at around $65.2 billion. However, operating profits are still expected to be $7.2 billion, which works out to an operating profit margin of less than 11% for the year.

Worse, subtracting the cost of pension adjustments (the same thing that torpedoed results in Q2), Lockheed Martin has steeply downgraded its expectations for bottom-line profits. Per share, the company expects to end the year with just $21.55 in profit -- 19% below what it previously projected.

Times about 266 million shares outstanding, this works out to a projected bottom line net profit of $5.7 billion for the year. In turn, this works out to a net profit margin of just 8.7% for Lockheed this year. And to put that number in context, this will be Lockheed's worst year for net profits since 2017, and its second straight year of net profit margins declining, according to data from S&P Global Market Intelligence.

The upshot for investors

So are investors making a mistake in bidding up shares of Lockheed Martin in the wake of these results? I fear they are.

Sales are falling, and so are margins on those sales -- in the middle of a war that should be good for defense stock profit margins. Valuation-wise, Lockheed stock costs 18.3 times current-year forecast earnings. Even valued more generously on its free cash flow (projected to be $6 billion), the stock's only a little bit cheaper at 17.5x FCF.

That would be a fair price to pay if Lockheed were growing earnings in the strong double digits. Instead, analysts project the company's profits will grow only about 6% annually over the next five years. With sales slowing, profits sagging, and its stock now valued at a PEG ratio of close to 3.0, now simply doesn't look like a great time to buy Lockheed Martin stock.