Boeing said on Wednesday it completed the retrofit of 787 battery enhancements on previously delivered airplanes during the quarter and delivered 16 787 aircraft, up from six a year ago.
The company said it now expects full-year revenue of $83 billion to $86 billion, up from its previous guidance of $82 billion to $85 billion.
It forecast full-year earnings of $5.10 to $5.30 per share, up from its previous estimate of $5.00 to $5.20.
"As expected, second-quarter EPS beat, but even more impressive was BCA (Boeing Commercial Airplanes) margins exceeded expectations despite ramping deliveries of low margin 787s," Sterne Agee & Leach Inc analyst Peter Arment wrote on a research note.
Operating margins in the commercial airplanes unit rose to 10.7 percent in the quarter from 10.2 percent a year ago.
Boeing shares rose to a high of $109.49 in early trading on the New York Stock Exchange on Wednesday.
RBC Capital Markets analyst Robert Stallard said the investor focus had switched to Boeing's cash outlook from "the usual slew of 787 questions."
"Although cash generation in 2Q was strong, we would have expected the company to have been more aggressive on the buyback in the quarter," Stallard wrote on a note to clients.
"Presumably this leaves plenty of firepower for future buybacks or dividend increases," he said.
Boeing reported free cashflow of $3.01 billion in the second quarter, significantly higher than the $552 million it reported a year earlier.
It reported net income of $1.09 billion, or $1.41 per share. Excluding items, it earned $1.67 per share.
(Read more: Despite fire, airlines flying Boeing Dreamliner)
Revenue rose 9 percent to $21.8 billion. Commercial aircraft revenue rose 15 percent in the quarter.
Analysts had expected $1.58 per share, excluding items, on revenue of $20.78 billion, according to Thomson Reuters I/B/E/S.
Revenue from Boeing's defense, space & security unit was flat, indicating growth in the quarter was driven by its commercial plane business.