On Wednesday afternoon, Ford Motor Company (F 0.17%) reported stellar second-quarter earnings results. Revenue surpassed $40 billion for the first time since 2019, while the company's adjusted operating margin reached 9.3%, powering a huge earnings beat.

To some extent, Ford's second-quarter earnings may have benefited from favorable timing of shipments. Nevertheless, the results showed that the auto giant's efforts to sustainably improve its profitability are working. As a result, Ford stock rallied 15% last week -- and it could keep rising in the years ahead.

A big earnings recovery

In Q2 2021, a severe semiconductor shortage crushed Ford's revenue and profitability, particularly in North America. Supply constraints have eased significantly since then. The Blue Oval's wholesale volume surged 89% year over year in North America last quarter, rising from approximately 327,000 units to 618,000 units.

That volume recovery caused revenue to nearly double to $29.1 billion in the region, while the segment's adjusted operating margin expanded by 10 percentage points to 11.3%. This enabled Ford to record a $3.3 billion quarterly adjusted operating profit in North America: up from less than $200 million a year earlier.

The sharp rebound in Ford's largest and most important market helped the company more than triple its global adjusted operating profit to $3.7 billion, boosting adjusted earnings per share to $0.68. That crushed the analyst consensus of $0.45.

Thanks to this strong quarterly performance, Ford maintained its full-year guidance for adjusted operating profit to rise 15% to 25% year over year to between $11.5 billion and $12.5 billion. It also continues to expect adjusted free cash flow to land between $5.5 billion and $6.5 billion.

Plenty of work left

Ford's Q2 earnings beat doesn't mean the company's turnaround is complete. First, the company is still struggling just to break even in its two largest overseas markets: Europe and China. (To be fair, temporary supply chain constraints contributed to that underperformance -- and breakeven would be a huge improvement compared to 2018 and 2019 in China.)

Additionally, profitability has been quite volatile from quarter to quarter since 2020, based on the timing of production and shipments. Last quarter, Ford shipped significantly more vehicles than it delivered in North America, boosting its profit in the region.

Indeed, Ford's full-year guidance implies that it will generate an adjusted operating profit of about $6 billion in the second half of the year: an average of $3 billion per quarter. That implies a step down in profitability compared to the automaker's Q2 adjusted operating profit of $3.7 billion.

Ford is on the right track

For investors, the key takeaway from Ford's earnings report is that management's long-term turnaround plan is gaining traction. Profitability has improved dramatically compared to 2019 despite lower wholesale volume. That's a testament to the company's cost-cutting efforts and its strategic decision to discontinue most of its sedans and hatchbacks in North America in favor of a broader range of higher-margin crossovers, SUVs, and pickup trucks.

A pair of Ford Broncos parked on rugged terrain.

Image source: Ford Motor Company.

To be sure, Ford needs to continue cutting costs so that it can withstand potential pricing pressure as auto supply improves and economic growth slows. Its plans to aggressively grow sales of its electric vehicles over the next few years could weigh on its near-term margins, too.

However, Ford shares had lost more than half of their value between mid-January and early July, suggesting that many investors and analysts had a much bleaker outlook.

Even after rallying last week, Ford stock trades for around seven times forward earnings. That leaves massive upside potential if management's plans to expand the company's adjusted operating margin to 10% by 2026 succeeds. In the meantime, investors are getting paid to wait. In conjunction with its strong earnings report, Ford raised its quarterly dividend to $0.15 per share, boosting its annual yield to an attractive 4%.