As the grounding of the Boeing (BA -1.02%) 737 MAX has stretched from weeks to months, it has become clear that this safety crisis will prove costly for the aerospace giant. A few months ago, it seemed likely that the 737 MAX would return to service near the end of the summer. But due to additional safety problems uncovered during testing, a November or December return now seems more realistic -- and some observers think the grounding could extend into 2020.

On Thursday afternoon, Boeing gave investors a first look at the expected costs of the 737 MAX grounding. The numbers it provided were eye-popping.

Boeing will take a big special charge

Most notably, Boeing announced that it will record a $4.9 billion special charge in the second quarter -- $5.6 billion before tax. The company described that amount as "an estimate of potential concessions and other considerations to customers for disruptions related to the 737 MAX grounding and associated delivery delays."

Indeed, the extended grounding of the Boeing 737 MAX has been very costly for customers. In some cases, airlines have had to cancel flights due to fleet shortages. Others have resorted to pricey short-term aircraft leases or have been forced to keep flying older, fuel-guzzling aircraft that were scheduled for retirement in order to cover for grounded 737 MAX jets. American Airlines -- one major 737 MAX buyer -- has estimated that the grounding will hurt its 2019 pre-tax profit by hundreds of millions of dollars.

Boeing noted that it will compensate customers in a variety of forms and over a period of many years, but not all at once. Many airlines are likely to get big discounts on future aircraft purchases in lieu of cash compensation, which will spread out the hit to Boeing's cash flow.

A rendering of a Boeing 737 MAX 8 in flight.

Boeing will probably try to compensate customers with discounts on future purchases. Image source: Boeing.

737 production costs have increased

In addition to the special charge, Boeing said that it increased its estimated costs to produce the current accounting quantity of 737 MAX jets by $1.7 billion during the second quarter. This reflects the inefficiencies from temporarily reducing the 737 production rate from 52 per month to 42 per month. (Boeing had initially planned to boost its 737 output to 57 per month this year.) That comes on top of a $1 billion increase to Boeing's estimated 737 MAX production costs that was announced several months ago.

Under program accounting rules, Boeing estimates revenue and costs for each aircraft type it produces as far out as it can reliably budget. The accounting quantity represents the number of aircraft to be built over that period. Boeing then spreads its estimated profit for the aircraft program over the full accounting quantity for the purpose of reporting earnings. The idea is that this smooths out the predictable volatility in the profitability of each aircraft program over time. (Production costs start out high and then decline over time.)

In practical terms, the $1.7 billion in lost profits announced on Thursday will hit Boeing's cash flow in 2019 and 2020. However, it will flow through to earnings over the next 3,000 or so 737s to be produced, a period of nearly five years.

The hits will keep coming

On a pre-tax basis, the increased costs that Boeing highlighted this week total $7.3 billion. That total rises to $8.3 billion, including the $1 billion in extra production costs announced last quarter.

When all is said and done, the total bill will be even higher. The special charge announced on Thursday accounts for compensation to customers, but Boeing will also have to pay substantial compensation to the families of victims of the two 737 MAX crashes over the past year. The company is likely to face stiff penalties from aviation safety regulators, as well.

Furthermore, Boeing said that its cost estimates assume that the 737 MAX will be recertified early in the fourth quarter. That seems like a best-case scenario. Boeing expects to submit a new software update to the Federal Aviation Administration (FAA) no earlier than September. If any further problems are discovered -- or if regulators in the U.S. or abroad drag their feet -- the recertification could be delayed, causing the company to rack up additional costs.

Fortunately, Boeing is a highly profitable company. Once 737 MAX deliveries resume, Boeing will return to churning out ample cash flow, allowing it to absorb the costs of the 737 MAX grounding. But investors should be prepared for those costs to far exceed $10 billion by the time Boeing finally puts the current crisis in the rearview mirror.