* Ryanair says backlog of staff leave among factors
* Norwegian Air says has hired more than 140 Ryanair pilots
* Airline expects up to 20 million euros in compensation claims
* Including other factors, total cost could be more - analyst
* Ryanair CEO sees "large reputational impact" (Adds details from Ryanair CEO news conference)
DUBLIN, Sept 18 (Reuters) - Ryanair said on Monday it had messed up after the Irish budget airline disrupted the plans of hundreds of thousands of travellers by cancelling flights to cope with pilot shortages and improve its punctuality record.
The airline said it was preparing for up to 20 million euros ($23.9 million) in compensation claims and 5 million euros in lost fares as a result of the cancellations, but analysts estimated the total cost could be higher.
Ryanair blamed a number of factors for the sudden cancellations including a backlog of staff leave, which must be taken by the end of the year.
Europe's largest airline by passenger numbers also said air traffic control strikes and weather disruption were affecting its performance.
Chief Executive Michael O'Leary promised the problem would not recur in 2018 but said there would be a "large reputational impact" from the cancellations.
Rival Norwegian Air said on Monday that it had recruited more than 140 pilots from Ryanair this year, adding to the squeeze on staffing, although O'Leary said it was not short of pilots and was able to fully crew its peak summer schedule.
"It is clearly a mess but in the context of an operation where we operate more than 2,500 flights every day, it is reasonably small but that doesn't take away the inconvenience we've caused to people," O'Leary told Sky News.
He said the problems were not the result of pilots quitting but was "because we're giving pilots lots of holidays over the next four months." Every passenger who is entitled to compensation will receive it in full, he added.
Seeking to halt a decline in performance figures, Ryanair has taken the unusual step of announcing plans to cancel between 40 and 50 flights per day until the end of October.
Ryanair said the cancellations were designed "to improve its system-wide punctuality which has fallen below 80 percent in the first two weeks of September" and as low as 70 percent in the days before the drastic move to cancel flights was taken.
While it currently calculates crew leave from April to March, the Irish Aviation Authority is forcing it to calculate it from January to December from the start of 2018, it added.
COST OF CANCELLATIONS
Ryanair sent emails to the first affected passengers last Friday, giving them the choice of a refund or an alternative flight. It has issued cancellation notices up until Wednesday.
The move brought bad publicity for an airline which has worked hard over the past few years to improve a reputation for treating passengers badly.
News bulletins in Ireland ran interviews with disgruntled customers while newspapers asked readers to share their stories, including a wedding party who told the Irish Times they had been left stranded in France.
Analysts at Dublin-based Goodbody Stockbrokers estimated the cancellations would cost the airline about 34.5 million euros ($41.2 million)m -- comprising 23.5 million euros in compensation, 6.3 million euros in lost fees, and 4.7 million euros in subsistence such as meals, drinks and accommodation.
Goodbody said that would shave 2.3 percent off its full-year forecast of 1.479 billion euros in profit after tax.
In July, Ryanair reiterated its 1.4 to 1.45 billion euro forecast for the financial year ending March 31, 2018.
PILOTS IN DEMAND
Barring exceptional circumstances, airlines must under EU rules provide at least two weeks' notice to avoid paying compensation of 250 euros per passenger for flights of 1,500 km or less or 400 euros for longer flights within the bloc.
The fall in Ryanair's punctuality below 80 percent compared to an average of 89 percent in the three months to the end of June. O'Leary said at the time he was not happy with that figure, seeking a mark of over 90 percent.
The Irish Independent reported on Monday that Ryanair had been offering pilots a 10,000 euro ($11,925) "signing-on bonus" in response to recruitment problems.
Ryanair employed 4,058 pilots at the end of March, according to its annual report, up from 3,424 a year earlier to keep up with a rapid growth in passenger numbers.
Training company CAE Inc warned recently the worldwide commercial aviation industry would need an extra 255,000 pilots by 2027 to sustain its rapid growth and was not moving fast enough to fill the positions.
Shares in Ryanair, which fell by more than 3 percent in early trading, were 1.85 percent lower at 1430 GMT. ($1 = 0.8362 euros) (Additonal reporting by Ole Petter Skonnord in Oslo, Victoria Bryan in Berlin and Alistair Smout in London; Editing by Mark Potter/Keith Weir/Alexander Smith)