There's no sugar-coating it: FLIR Systems' (NASDAQ:FLIR) Q4 earnings report was abysmal.

After the company reported earnings early Tuesday morning, FLIR Systems stock promptly cratered, ending the day as the worst-performing equity on the S&P 500. And there were two key reasons.

Infrared optical picture.

FLIR Systems can detect heat -- but FLIR stock isn't looking so hot right now. Image source: FLIR Systems.

The earnings

First and foremost, FLIR's earnings were bad. For the fiscal fourth quarter, FLIR reported profits of only $0.45 per diluted share on sales of just $474.7 million. True, on one hand, FLIR's sales number exceeded Street expectations for sales of $452.6 million. On the other hand, FLIR's earnings on that bumper crop of sales fell short of analysts' projected $0.54-per-share profit, and were down 12% from last year's $0.51 Q4 profit.

Nor was this FLIR's only bad news this week. Marrying the above results with the numbers from FLIR's previous three reported quarters, the company arrived at full-year profits of $1.20. That was down a whopping 30% from the $1.72 per share FLIR had earned in 2015. And that was despite the fact that it booked $1.66 billion in revenue last year, up 7% from the $1.56 billion revenue haul in 2015.

And it gets worse. Clearly, the numbers above tell a tale of declining profit margins (otherwise profits would have been expected to rise alongside sales). But now, sales may be preparing to taper off as well. According to FLIR, its backlog of "firm orders" to be delivered over the next 12 months has declined 2% over the past year, and shrank by an even more disheartening 8% between Q3 and Q4 alone. With fewer orders in the backlog, it's difficult to see how FLIR can expect to grow sales in the year ahead -- management's assertions of confidence in its "ability to drive continued growth and improve margins in 2017" notwithstanding.

Guidance

Speaking of which, management continues to insist that it will grow sales by as much as 7% to 10% this year, to somewhere between $1.78 billion and $1.83 billion. Either number, incidentally, would exceed analyst expectations for this year -- but with backlogs shrinking, the trend doesn't seem to be working in FLIR's favor.

The other news

Simultaneous with this earnings release, FLIR announced that its CEO, Andrew Teich, has decided to retire from the company after 33 years of service. No successor has been named. On the plus side, though, Teich has apparently not been ordered to walk the plank. FLIR says he will remain at the helm "until a successor is appointed."

Even so, investors don't seem to like the idea of hanging around FLIR stock even as the boss is making plans to clear out his own desk.

What's an investor to do now?

After all the above news, FLIR stock ended Tuesday trading down 6.2%, and as mentioned, the worst performer on the S&P. But perverse as it may sound to think this way, at least this makes the stock a bit cheaper for new buyers. So... should you buy FLIR stock today?

Here's how I look at it: Priced at $34.15 per share, FLIR stock currently costs 27.9 times trailing earnings, which seems pretty rich considering that most analysts who follow the stock, and have submitted earnings expectations for it to S&P Global Market Intelligence, believe FLIR will be lucky to grow earnings much faster than 7% a year over the next five years.

Moreover, while it's true that (as management points out), FLIR just reported its "highest quarterly cash flow since 2013", and that management has kept a tight rein on capital spending, I still value this company at roughly 16.8 times its $276 million in positive free cash flow. That's cheaper than the more obvious P/E ratio -- but still not cheap enough to justify buying the stock on only 7% expected growth.

Long story short: Even after Tuesday's sell-off, the stock is up a healthy 20% over the past 52 weeks. Were I a shareholder today, I'd say now is looking like a pretty good time to lock in what profits remain to me, and exit FLIR stock.

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