Carnival's (CCL 0.22%) (CUK 0.19%) earnings and share price suffered in the earlier stages of the pandemic. The world's biggest cruise ship operator was forced to halt operations -- and that pushed the usually profitable company to a loss. In 2020, the stock lost 57%.

After a disastrous couple of years, though, this travel giant has greatly turned things around. In the most recent quarter, Carnival showed demand for its cruises was back -- and stronger than ever. The company even made better-than-expected improvements in narrowing its net loss.

This is all very positive news. But Carnival still faces one big problem. Let's take a closer look at one hidden drag on its results.

Good news first

First, let's start with a bit of the good news, and that has to do with travelers. In the first quarter, Carnival reported its highest ever quarterly booking volumes -- and broke records in North America, Europe, and Australia. Customer deposits reached a first-quarter record. And revenue of $4.4 billion came in at 95% of its 2019 levels.

The company also beat its own guidance in adjusted earnings before interest, taxes, depreciation, and amortization (EBITDA) and the narrowing of its net loss. Adjusted EBITDA of $382 million surpassed the forecast range of $250 million to $350 million -- and that happened in a context of higher fuel prices and unfavorable currency exchanges. In addition, Carnival reported a U.S. generally accepted accounting principles (GAAP) net loss of $693 million -- instead of an expected $750 million to $850 million loss.

All this means demand is there. That's leading to high levels of revenue. And the company has been able to reduce its loss and take steps toward profitability.

But it may not be smooth sailing every step of the way. Here's what's holding Carnival back these days: an enormous amount of debt.

In fact, if we look to one particular metric, things don't look fantastic. The debt-service coverage ratio, based on operating income and total debt, offers clues about a company's ability to pay its loans. As you can see in the chart, Carnival's posting an operating loss these days. And its level of debt has soared -- due to those months of halted cruise operations.

CCL Operating Income (Annual) Chart

CCL Operating Income (Annual) data by YCharts

Meanwhile, today's higher-interest rate environment adds a headwind to the picture: Variable-rate borrowings could become more costly for the company.

But before you take your portfolio and set sail far from Carnival shares, let's consider another element. Carnival's earnings progress should help it pay down its debt. Of course, this won't happen overnight. But the company is moving in the right direction.

Positive cash from operations

Carnival's cash from operations turned positive in the first quarter. The company expects this to continue in the coming quarters -- and Carnival said this will be "the driver" to lower debt levels. The cruise leader ended the quarter with about $8 billion in liquidity and said it's "well positioned to pay down near-term debt maturities from excess liquidity."

So, should you buy Carnival shares? Using the percent change formula, we can see Carnival shares have soared more than 90% so far this year. They may not continue at that pace, especially considering the debt headwind that could weigh on earnings for quite some time.

Still, there's reason to be optimistic about Carnival over the long term. Demand for the company's cruises is high, Carnival is making progress along the path to profitability -- and, importantly, it has set out a plan to pay down debt. Meanwhile, the shares, even considering recent gains, still trade for only 1.2 times sales -- lower than their more than 2 ratio a year ago.

Long term, Carnival stock could advance significantly from today's level. That's why, for investors who can tolerate some risk, it isn't too late to buy shares of this cruising powerhouse.