Three months ago, Southwest Airlines (LUV -0.44%) reported a disappointing loss for the first quarter. However, business came roaring back in the second quarter. This week, the low-fare airline giant reported that its revenue and net income surged to record highs last quarter.

Despite the strong earnings report, Southwest Airlines stock sank more than 6% after the earnings release on Thursday. Investors were understandably rattled by the company's guidance, which calls for slowing unit revenue growth and continued cost headwinds in the third quarter. Nevertheless, this dip looks like an attractive opportunity to scoop up Southwest Airlines stock at a discount.

Record results

Last quarter, Southwest Airlines' revenue jumped 13.9% compared to Q2 2019, reaching an all-time high of $6.7 billion, even though the carrier operated 6.7% less capacity than it did in 2019. Unit revenue surged 22% over this period.

Of course, Southwest Airlines also experienced significant cost inflation in the second quarter. Adjusted non-fuel unit costs rose 13.1% relative to 2019, while fuel costs skyrocketed from $2.13 per gallon to $3.36 per gallon. Still, the cost pressure would have been much worse but for the company's aggressive fuel hedging strategy. Fuel hedging gains saved Southwest over $300 million before tax last quarter.

Southwest's strong revenue results more than offset the cost pressure. As a result, adjusted net income reached a record $825 million: up from $741 million in Q2 2019. Adjusted earnings per share (EPS) slipped from $1.37 to $1.30, due to an increase in the company's share count during the pandemic. Nevertheless, this comfortably beat the analyst consensus of $1.18.

Guidance disappoints

Looking ahead to the third quarter, Southwest plans to increase capacity to 2019 levels. But despite sequentially increasing capacity, the company expects revenue growth to slow to a range of up 8% to 12%.

Part of that slowdown relates to Southwest's decision to remove expiration dates from all travel credits. That will negatively impact Q3 revenue growth by about 5 percentage points. But even excluding that one-time item, Southwest's forecast implies that unit revenue growth will slow from 22% in the second quarter to around 15% in the third quarter. Indeed, management said that June will be the strongest revenue month of the year for Southwest Airlines.

Southwest Airlines planes on the ground.

Image source: Southwest Airlines.

Meanwhile, Southwest expects non-fuel unit cost inflation to accelerate slightly this quarter to a range of 12% to 15%, despite sequentially higher capacity. The company continues to face a wide swath of inflationary headwinds, and productivity has fallen compared to 2019. Fuel costs will remain elevated, too. Together, these factors point to a sharp profitability downturn in the second half of 2022.

Choppy air ahead

Looking forward, Southwest Airlines faces numerous risks to its growth and profitability. First, although the company has met most of its hiring goals, pilot supply remains tight. Delivery delays at Boeing could constrain Southwest's growth by the second half of 2023 even if the company meets its pilot hiring objectives over the next year.

Second, Southwest will likely continue to experience meaningful pressure on many cost items next year and will have much less protection from fuel hedges in 2023 than it has had this year.

Third, air travel demand could sag as inflation and slowing economic growth pinch consumers' wallets. That could cause airfares to recede from the highs of 2022, particularly if Southwest and other carriers keep increasing capacity.

An attractive stock despite the risks

After its recent pullback, Southwest Airlines stock sits a little above $38, down from over $60 in early 2021. And while the carrier's results could be volatile in the near term, it continues to have strong long-term prospects.

Entering 2022, Southwest's aging 737-700s still represented 62% of the carrier's fleet. On the flip side, it had just 69 ultra-efficient 737 MAX 8s: less than 10% of the total fleet. Despite Boeing's delivery delays, Southwest expects to nearly double its 737 MAX 8 fleet this year, adding 66 of the type. It will continue to rapidly upgrade to the 737 MAX in 2023 and 2024, significantly improving its fuel efficiency while mitigating non-fuel unit cost pressures. That could help drive sustainable margin improvements.

Furthermore, Southwest Airlines ended the second quarter with $5.9 billion of net cash. That's far more than the company needs, and it translates to more than a quarter of its market cap. With restrictions on dividends and share buybacks set to end on Sept. 30, Southwest could soon resume a meaningful dividend and share repurchase program.

As industry conditions normalize, Southwest's fleet modernization progresses, and the company shrinks its share count, I expect EPS to surpass its 2019 high of $4.27 by 2024. That makes Southwest Airlines stock quite attractive at its Friday closing price of $38.12.