Shares of Apple (Nasdaq: AAPL), the world's most valuable technology company, set a new record high Thursday  after several analysts at firms including Goldman Sachs (NYSEL GS) and UBS (NYSE: UBS) boosted their price targets for the Cupertino, Calif.-based company, citing potential sales of the iPhone 5.

Apple shares set a new record of $685.50 before closing at a record $682.98, up $13.19, or 2 percent. They'd set the last all-time high of $683.29 on Monday.

Bill Shope of Goldman Sachs raised his target price to $810 from $790 because he believes the iPhone 5 will be a powerful driver of earnings upside in the December quarter. The iPhone 5 will ship for only a week in Apple's fourth quarter ending Sept. 29.

Shaw Wu of Sterne Agee set an $820 target for Apple, up $40, and estimated the company will ship 26 million iPhones in the current quarter, up from the projection of only 23 million he had estimated before.

Toni Sacconaghi, a Bernstein Research technology analyst, upped his target price for Apple to $800 from $750, based on his conviction the iPhone 5 will have a faster and wider rollout than previous iPhones.

At UBS, analyst Steven Milunovich also boosted his target price for Apple to $780 from $740, also on expectations for a huge success with consumers. Apple should ship between 8 million and 10 million iPhone 5s in their first week of availability, coinciding with the end of the company's fiscal year, he said.

Milunovich also estimated Apple will sell as many as 44 million iPhone 5s next quarter, down from 48 million, due to the timing of the introduction. From an investor's viewpoint, he said, the biggest money to be made was recognizing years ago that an Apple event would become akin to the Oscars in technology.

Thursday's surge brings Apple's market capitalization above $640 billion for the first time. By contrast, Exxon Mobil Corp. (NYSE: XOM), the No. 1 energy company and the second-largest U.S. company in value, is worth only $421 billion.