This week, Delta Air Lines (DAL -0.79%) reported second-quarter results that fell just short of the company's most recent guidance on several metrics. Investors punished the stock in response, sending it down by more than 4% on Wednesday.

However, that earnings report was much better than it may have seemed to many investors. And with Delta Air Lines trading near a 52-week low, the stock looks like a great buying opportunity.

Free cash flow beats guidance

Delta Air Lines reported adjusted revenue of $12.3 billion for the second quarter. That beat its initial quarterly forecast, but fell short of its most recent guidance by about 1%. Moreover, Delta posted an adjusted operating margin of 11.7%, missing its updated guidance range of 13% to 14%. As a result, adjusted earnings per share came in at $1.44, roughly 16% below the average analyst estimate.

These headline numbers caught investors' attention. But Delta's results were hurt by short-term factors including operational disruptions during June and a big jump in fuel prices over the course of the quarter.

More significantly, Delta Air Lines generated $1.6 billion of free cash flow last quarter, beating its most recent guidance by about $100 million. For airlines, free cash flow is a better indicator of long-term performance, particularly because of the lag between when carriers sell tickets and when they recognize revenue. (If fuel prices jump by 20%, for example, Delta can raise its fares to compensate, but it can't do anything about outstanding tickets it previously sold at lower prices.)

Unit revenue growth is still accelerating

Delta's total unit revenue exceeded 2019 levels by 20% last quarter as air travel demand far outpaced seat supply. Those dynamics will remain in place this summer. As such, management expects unit revenue growth to accelerate further in the third quarter. That's great news for Delta shareholders.

The full-service airline's forecast calls for Q3 revenue to increase by 1% to 5% compared to Q3 2019, even though it will be operating with 15% to 17% less capacity. That implies a nearly 23% unit revenue gain at the midpoints of those ranges. In short, Delta continues to have enough pricing power to mitigate the impact of temporarily elevated costs.

A Delta Air Lines plane landing on a runway.

Image source: Delta Air Lines.

Delta's credit card partnership is booming

Finally, Delta Air Lines reported that total remuneration from its credit card partnership with American Express surged by 35% compared to Q2 2019 last quarter to a record $1.4 billion. Spending on Delta co-branded AmEx cards was up a stunning 43% over that period.

These strong results contributed to Delta's excellent free cash flow last quarter. However, most of the cash paid by American Express for SkyMiles isn't recognized as revenue until customers use those miles for flights. Thus, Delta's revenue and earnings results don't incorporate the full benefit of the credit card program's growing momentum.

Delta also noted that new card signups easily exceeded pre-pandemic levels last quarter. That bodes well for Delta's target of surpassing $7 billion in annual remuneration from American Express by 2024.

A bargain stock

Despite missing its margin target last quarter, Delta Air Lines reaffirmed that it's on track to grow adjusted earnings per share to more than $7 by 2024. It also expects to generate over $4 billion of annual free cash flow by then. Considering Delta's unit revenue momentum, strong cash flow, rapidly growing credit card revenue stream, and the cost benefit of returning to pre-pandemic capacity levels, these targets seem quite achievable.

Nevertheless, Delta Air Lines stock is trading below $30 -- i.e., around 4 times management's 2024 earnings target. That leaves a sizable margin of safety and makes Delta shares look like a great buy right now.