Boeing Co posted a larger quarterly profit on Wednesday, topping analyst forecasts, on strong commercial and military sales, and the company raised its earnings forecast for the full year.

Shares of the world's largest aerospace and defense company climbed 4.2 percent to $66.42 in morning trade on the New York Stock Exchange.

This was a good operating performance at both (Boeing Commercial Airplanes) and defense, aerospace analyst Robert Stallard of RBC Capital Markets said in a research note.

We think airline demand and the backlog remains robust, and Boeing's cash position should start to improve as 787 and 747-8 inventory starts to ship. We think these two drivers will overwhelm other issues going forward -- if Boeing can execute.

Boeing recently began making deliveries of 787 Dreamliners and 747-8 Freighters, two of its highest-profile airplanes, which are years behind schedule.

Boeing, which competes with EADS unit Airbus, said third-quarter profit rose to $1.1 billion, or $1.46 per share, from $837 million, or $1.12 per share, a year earlier.

The average Wall Street earnings forecast was $1.10 per share, according to Thomson Reuters I/B/E/S.

For the full year, Boeing raised its earnings per share guidance to a range of $4.30 to $4.40, reflecting strong core performance. Its previous forecast was $3.90 to $4.10.

The company, however, narrowed its 2011 revenue forecast to between $68 billion and $70 billion, from $68 billion to $71 billion previously.

Today the shares are going to trade on EPS numbers, but long-term I think it's order books, said Neal Dihora, equity analyst at Morningstar. If we're entering into a slow economic period, we're not going to get as many orders.

Boeing, which splits its business between defense and commercial airplanes, said third-quarter revenue increased 4 percent from a year earlier to $17.7 billion, while its order backlog grew to $332 billion from $323 billion at the beginning of the quarter.

Revenue for Boeing's commercial airplanes division increased by 9 percent to $9.5 billion on increased deliveries of its airplanes.

Earlier this month, Boeing said it delivered 127 commercial airplanes in the third quarter, including 100 of its best-selling 737 narrowbodies and 21 widebody 777s. The number of deliveries was up slightly from the 124 reported for the year-ago quarter.

Boeing gets paid for its airplanes at delivery. Its commercial airplane delivery guidance for 2011 is now about 480, down from previous guidance of 485 to 495.

Revenue for Boeing's defense, space and security business was $8.2 billion in the quarter, steady from a year ago.

The third-quarter results were reported on the day of the first commercial flight for Boeing's long-delayed and hotly anticipated 787 Dreamliner, a light-weight, carbon composite widebody.

The first 787 was delivered to All Nippon Airways last month, capping three years of delays for the development program. The first paying customers rode ANA's Dreamliner to Hong Kong from Tokyo.

Now, analysts want to know if Boeing can ramp up its production rate for the plane to 10 per month by the end of 2013, as promised. The current production rate is two per month.

Analysts also want to know when the 787 program will be profitable. Boeing has taken more than 800 orders for the plane.

Boeing said on Wednesday it would calculate the profitability of the program based on 1,100 planes.

Chief Executive Jim McNerney previously said he expected the program to be profitable from day one based on the company's usual accounting practices.

Alex Hamilton, managing director of EarlyBirdCapital, said 1,100 planes is a larger block size than Boeing has used to determine profitability on previous programs, but it is appropriate given the enormous order backlog.

They're going to be profitable from day one with very small margins, Hamilton said. It's a little bit of a break from historical precedent, and that's luxury they were given with such a large backlog. (Reporting by Kyle Peterson, editing by Matthew Lewis and John Wallace)