Last week, Boeing (BA 0.56%) reported a quarterly loss for the first time since 2009. The company incurred $3 billion of pre-tax charges last quarter, giving it no hope of breaking even.

That said, Boeing's underlying operating performance was much better than the company's bottom line would suggest. Here are five key details about Boeing's Q2 results and outlook for the future that management highlighted on the earnings call last week.

Strong underlying margin performance

Excluding the charges and the cost reclassification, [Boeing Commercial Airplanes] operating margins were solid 10.3%.
-- Boeing CFO Greg Smith 

Boeing has faced some margin pressure in its commercial airplanes division this year, largely due to an increase in R&D spending and product transitions. However, the commercial airplanes division posted a strong 10.3% operating margin in Q2, excluding the impact of the one-time charges Boeing incurred.

This indicates that Boeing is successfully reducing its costs in order to eke out more profit per airplane delivered. Boeing still has a lot of work to do to reach its goal of a mid-teens commercial airplanes segment margin by the end of the decade -- but it's on the right track.

Mixed demand trends

... [D]emand remains strong for the 737 with a robust backlog of nearly 4,400 firm orders... Turning to the twin-aisle market, while long-term demand remains strong we have seen some hesitation in near-term demand in recent months, varying by program.
-- Boeing CEO Dennis Muilenberg

Demand for Boeing's 737 narrowbody jet has remained red-hot this year. During Q2, Boeing received an important order for 100 high-density 737 MAX 200 jets from VietJet. As a result, Boeing continues to have a massive backlog of nearly 4,400 737s.

There's no shortage of demand for Boeing's upcoming 737 MAX jet. Image source: Boeing.

This supports Boeing's plans to ramp up 737 output by more than 35% over the next three years. Even at the increased production rate of 57 per month, Boeing's 737 backlog would stretch for more than six years.

On the other hand, demand for Boeing's widebody families -- and especially the 777 -- is weaker. Boeing CEO Dennis Muilenberg noted that there is a clear widebody replacement cycle on the horizon for the 2020s, but airlines are being cautious about ordering widebodies right now. This is problematic, because Boeing's backlog of current-generation 777s is fairly small.

Hefty charges

Our second-quarter financial results included ... a substantial impact to earnings from decisions we made on the 787 and 747 programs, and increased investment needed on the KC-46 Tanker program.
-- Dennis Muilenberg

While Boeing reported a loss last quarter, the massive charges it recorded should set it up for better performance going forward. For example, it wrote off the value of two of the first 787 Dreamliners it built after deciding not to try to sell them. This means Boeing doesn't have to find any more homes for early production models that don't meet the official specifications.

Similarly, Boeing wrote off the deferred production balance of its 747 jumbo-jet, acknowledging that it won't recover the money it lost on early production models. This should reduce the pressure that it feels to keep the 747 program going if demand doesn't bounce back soon.

Finally, Boeing took yet another charge on its troubled KC-46 tanker development program. But at least this time, its extra investment has paid off: the test models have now completed all of the refueling tasks necessary to get an official go-ahead for initial production from the Air Force.

787 profitability is improving

787 deferred production declined by $1 billion in the quarter driven by the cost reclassification, bringing the balance at the end of the quarter to $27.7 billion. When normalizing for the cost reclassification, deferred was better than planned at an increase of just $33 million.
-- Greg Smith

Leaving aside Boeing's decision to write off the cost of two early build Dreamliners as an R&D expense, profitability for the long-troubled 787 program is steadily improving. Deferred production costs increased by just $33 million, meaning that the profitability of 787s built in Q2 almost equaled the average profit margin Boeing expects over the 787 accounting block of 1,300 airplanes.

By contrast, deferred production costs increased by $790 million in Q2 2015. This shows just how far Boeing has come in terms of reducing 787 production costs. The company has clear plans to maintain this momentum, allowing it to recoup its $27.7 billion in deferred production costs during the next six years or so.

777 remains a risk

On 777, we understand the reality of where we are at. ... The fact is, year to date we've got net orders for 8 777s against a target of approximately 40. So clearly we have work to do yet over the next few months...
-- Dennis Muilenberg

While the 787 program is finally running smoothly, Boeing is starting to have trouble with its 777 widebody jet. The company has more than a dozen available 777 delivery slots next year and has sold less than 60% of the 2018 delivery slots. Meanwhile, sales have slowed to a crawl, as Boeing has only brought in eight net firm orders thus far in 2016.

Boeing has struggled to sell 777s lately. Image source: Boeing.

Boeing still hopes to secure about 40 net firm orders this year, but management recognizes that this will be hard to pull off. As a result, for the first time ever, Boeing hinted at the possibility of cutting production beyond the effective rate of 5.5 per month scheduled for 2018 and 2019.

On the bright side, deliveries of the next-gen 777X are on track to begin in early 2020. And the introduction of that new model -- which has already garnered more than 300 firm orders -- will allow Boeing to ramp up its production rate again in the early 2020s. So while there may be some pain for investors from slowing 777 production, it won't last forever.