Investors had very low expectations coming into General Electric's (GE -1.04%) second-quarter earnings report. The global supply chain is still in tatters, inflation remains persistently high, and rising interest rates could push the economy into a significant recession.

Despite these headwinds, GE posted strong Q2 results, crushing analysts' estimates. While the industrial giant warned that it will continue to face big challenges in the second half of 2022 and reduced its free cash flow target, investors were relieved that the company didn't cut its earnings guidance. As a result, GE stock rose almost 5% after the earnings release on Tuesday.

With the aerospace market recovering rapidly and General Electric making steady progress toward splitting into three companies, GE stock still looks like a great buy for long-term investors.

A surprising earnings beat

GE reported total revenue of $18.6 billion last quarter, up 2% year over year despite foreign currency headwinds. On an organic basis, revenue rose 5%. Meanwhile, GE's adjusted operating profit surged 81% to nearly $1.7 billion, and adjusted earnings per share (EPS) jumped to $0.78 from $0.22 a year earlier. The analyst consensus had called for adjusted EPS of just $0.37.

To some extent, one-time items boosted General Electric's bottom line last quarter. However, the strong recovery of the aviation market powered the bulk of its profit growth.

Revenue at GE Aerospace reached $6.1 billion, the highest level achieved since the first quarter of 2020. Furthermore, the segment's adjusted profit margin reached 18.7% -- near pre-pandemic levels -- thanks to a favorable mix shift. That drove a nearly $1 billion year-over-year increase in segment profit.

The aerospace segment's stellar performance more than made up for continued weak results in GE's renewable energy business, as well as modest margin pressure at its healthcare unit. Furthermore, GE Aerospace's order activity continues to outpace its revenue by a wide margin, paving the way for future growth as supply chain issues and labor constraints ease.

A wind turbine in a green field.

Image source: General Electric.

A modest guidance reduction

Three months ago, GE reaffirmed its 2022 guidance but said that its results would likely come in near the low end of its target ranges. However, many GE shareholders expected a big guidance cut when the company reported its Q2 earnings.

Instead, GE reaffirmed its full-year outlook again on Tuesday, with the exception of lowering its free cash flow target by approximately $1 billion, mainly due to temporary working capital headwinds. That means it still expects to post 2022 adjusted EPS of at least $2.80, ahead of the recent analyst consensus of $2.78.

Balance sheet repair continues

In the first half of 2022, GE generated negative free cash flow of $718 million. However, the company sold most of its remaining shares of Baker Hughes at favorable prices, netting $3.8 billion. That covered a $2 billion capital contribution to GE's insurance business and $664 million of dividends and share buybacks, while still allowing GE to reduce its net debt slightly.

Even with a lower 2022 free cash flow target, GE is on pace to generate over $5 billion of free cash flow in the second half of the year. That will enable General Electric to continue strengthening its balance sheet.

Spinoffs could unlock value

GE plans to spin off its healthcare business as a stand-alone company in early 2023. Approximately 80% of the shares will go to current GE shareholders on a tax-free basis, with GE holding on to the remaining 19.9%.

GE's healthcare business is only about 15% smaller than Siemens Healthineers and has similar margins. That could make it worth nearly $50 billion based on Siemens Healthineers' recent market cap of $56 billion. At the beginning of 2022, Siemens Healthineers was worth over $80 billion, highlighting some valuation upside potential as supply chain constraints and inflation headwinds ease.

Chart showing fall in Siemens Healthineers' market cap since late 2021.

Siemens Healthineers market cap, data by YCharts.

Even after GE stock's rally on Tuesday, the company has a market cap of less than $80 billion. While GE Vernova -- the power and renewables business that GE plans to spin off in 2024 -- may not be worth very much, GE's current valuation implies an extremely low value for the aerospace business, despite its returning momentum.

By 2024, the spinoffs of GE's other businesses will leave the company as an aviation pure-play. That's likely to be good timing, with rising aircraft production and high utilization driving solid revenue and earnings growth. Thus, GE stock still looks like a great investment for patient investors.