Workers stand near Boeing 737 MAX airplanes as they sit parked at a Boeing facility adjacent to King County International Airport, known as Boeing Field, on May 31, 2019 in Seattle, Washington.

The 737 Max jets have been grounded since mid-March and regulators have not said when they expect to allow the planes to fly again.

The charge, which comes to $8.74 a share, is set to wipe out profits. Analysts expected the company to book a per-share profit of $1.80 for the second quarter, according to average estimates compiled by Refinitiv. The charge would reduce revenue and pre-tax earnings by $5.6 billion in the quarter, Boeing said.

Boeing on Thursday said it will take a $4.9 billion charge in the second quarter due to the worldwide grounding of its 737 Max planes after two fatal crashes that killed 346 people.

Boeing shares rose 2% in postmarket trading after the manufacturer disclosed the charge.

The Chicago-based manufacturer said the charge is an estimate of concessions for Max customers who have been left without the fuel-efficient planes during the peak summer travel period and through much of the fall with no end in sight to the grounding. It said it expects to compensate customers over several years but book the entire charge in the second quarter.

Regulators grounded the 737 Max fleets after the second of two fatal crashes within five months of one another. Investigators in the crashes — a Lion Air flight in Indonesia in October and an Ethiopian Airlines flight in March — implicated an automated stall-prevention feature on the jetliners. Boeing has developed a fix for the software but regulators haven't yet signed off on it yet.

Boeing said it is assuming that the planes will return to service early in the fourth quarter of this year but warned that could also be later, a challenge for carriers during the Thanksgiving and Christmas travel periods.

The crisis prompted Boeing to slash protection of the Max jets by nearly a fifth to 42 a month and pause deliveries of the planes, which are piling up in storage facilities and even an employee parking lot. Boeing said its results will assume a production increase to 57 a month in 2020.

Airlines, including Southwest, American and United, have canceled thousands of flights and repeatedly pushed back the planes' return to their schedules with little guidance on when the aircraft could take to the skies again.

Boeing is set to report full second-quarter results and hold a call with analysts on Wednesday.