What happened

Shares of discount flyer Spirit Airlines (SAVE -3.07%) are crashing today, down 18.5% as of 12:50 p.m. EDT, after the company reported second-quarter results.

So what

This is not the response you'd ordinarily expect for a company that beat earnings expectations, and yet, by all accounts, Spirit Airlines did beat expectations when it reported its Q2 2017 results last night -- sort of.

Revenue came in at $702 million, up 20% year over year but about $400,000 below what analysts had predicted. Spirit said that flights were up about 9% year over year, while "operating yields" (i.e., the ticket prices paid for those flights) grew 7%.

Earnings per share was $1.12 ($1.14 pro forma), however, and that was definitely more than Wall Street's expected $1.11 per share.

Spirit airplane

Image source: Spirit Airlines.

Now what

One of Spirit's big problems in the quarter seems to have been that operating costs grew 23%, which was faster than revenue increased, and thus prevented profits from growing as fast as sales. Fuel costs also exceeded sales growth -- up 26% year over year.

A second problem, and the one getting more attention today, is the fact that the company experienced 850 "pilot-related flight cancellations" in the quarter, which held back revenue from where it could have been and added costs. As Foolish airline expert Adam Levine-Weinberg explained, "Spirit Airlines relies on pilots picking up ... overtime work ... outside of the normal scheduling process. But in early May, most of Spirit's pilots started refusing the extra work -- despite being offered bonus pay for those flights -- in what seemed like a coordinated labor slowdown."

With Spirit and its pilots still engaged in contract negotiations, this problem appears to be ongoing, and could continue to weigh on Spirit Airlines stock for some time to come.