Shares of American Airlines (AAL 2.68%) and United Continental (UAL 5.05%) roared higher on Wednesday morning after both legacy carriers released favorable investor updates. While the first quarter was somewhat disappointing for airline investors, it appears that most airlines will report strong results for the second quarter.

Yet while American Airlines and United Continental got to bask in glory on Wednesday, they both remain significantly less profitable than Delta Air Lines (DAL 1.83%). A rising tide is lifting all boats in the airline industry, but Delta is maintaining its relative advantage.

American Airlines and United Airlines planes on the ground

American Airlines and United Continental just raised their Q2 margin forecasts. Image source: Pixabay.

Unit revenue tops estimates at American Airlines

Back in April, American Airlines' management forecast that revenue per available seat mile (RASM) would increase 3%-5% year over year in the second quarter. By early May, the company felt comfortable raising that guidance. For the past two months, it has been projecting a 3.5%-5.5% RASM increase for Q2.

On Wednesday, American Airlines increased its unit revenue guidance once again. It now believes that RASM increased 5%-6% year over year last quarter. Management linked the better-than-expected unit revenue performance to strong demand trends in the domestic market and much of Latin America.

Thanks to the strong revenue outlook, American Airlines boosted its pre-tax margin guidance range for the second quarter to 13%-14%. For comparison, American originally forecast that its Q2 pre-tax margin would be 11%-13% and raised that guidance range to 12%-14% in May.

United holds down unit costs

United Continental's investor update also included good news. The company now expects to report a pre-tax margin of 12.5%-13.5% in Q2, whereas it had originally forecast that its pre-tax margin would be 10%-12%.

Unlike American Airlines, United Continental didn't outperform on the revenue side. As it had noted in early June, a supply-demand imbalance in China and Hong Kong is weighing on unit revenue in the trans-Pacific market. Passenger revenue per available seat mile rose about 2% during the second quarter, right at the midpoint of United's original guidance. That said, cargo revenue and ancillary revenue did come in higher than expected last quarter.

A United Airlines plane

United's Q2 unit revenue was in line with the company's original forecast. Image source: United Airlines.

By contrast, United's Q2 cost performance was surprisingly good. Non-fuel unit costs rose about 3%-3.5% year over year during the quarter, compared to the airline's original guidance for a 4%-5% increase. Much of the improvement was related to strong operational performance, although United Continental did note that some costs got pushed out to later in 2017.

Meanwhile, like other airlines, United benefited from falling fuel prices during the quarter. The company ultimately paid $1.63 per gallon in Q2, compared to its original estimate of $1.72-$1.77 per gallon.

Better profit margins than expected, but still inferior to Delta

Thus, American Airlines and United Continental both outperformed their initial profitability expectations for the second quarter. However, neither one will come close to matching Delta Air Lines' margin performance this quarter.

Delta will reveal its results on Thursday morning, and it is on track to report a record 17%-18% pre-tax margin for Q2. That would be roughly 4 percentage points ahead of both American and United, even though a series of severe storms that swept through Atlanta in early April reduced Delta's pre-tax profit by about $125 million last quarter.

This just highlights how American and United both have weak spots relative to Delta. American Airlines' non-fuel unit costs jumped 7% year over year last quarter. As a result, its Q2 adjusted pre-tax margin is set to decline from last year's 15.4% mark. Furthermore, its unit revenue growth could slow going forward, as year-over-year comparisons are about to get a lot tougher.

As for United, unit revenue growth remains subpar. Furthermore, during Q2, United probably didn't feel the full impact of consumer backlash related to its numerous customer service gaffes of the past few months.

Investors who have bet on comebacks at American Airlines and United Continental have made a boatload of money over the past year, even though profits are still shrinking at both companies. But Delta Air Lines is likely to deliver a better ride for long-term investors, due to its consistent margin advantage.