Apple Inc shares flirted with a record $400 on Wednesday, a day after the world's most valuable technology company posted blockbuster results and triggered a spate of brokerage upgrades.

The stock set a lifetime high as a new $999 MacBook Air and $599 Mac mini go on sale, the latter rivaling some of the cheaper offerings from Dell Inc or Hewlett-Packard Co.

Apple's stock climbed 3.3 percent to $389.18, bringing the makers of the iPhone and iPad within shouting distance of Exxon Mobil's market value of more than $400 billion despite the oil and gas producer raking in more than four times Apple's annual revenue.

In coming months, Apple is expected to roll out a new iPhone, which is likely to give the world's most valuable technology company another shot in the arm and offer a challenge to rivals such as Google Inc and Research in Motion.

The new phone could also propel Apple to leap past Exxon.

We expect Apple will become the largest market cap company on the planet when the stock hits approximately $445 which is only about 13 percent away from aftermarket levels, said Gleacher & Co analyst Brian Marshall, adding that this is based on the assumption that Exxon shares remain flat.

Apple shares rose to a high of $405 in after-hours trading on Tuesday after iPhone sales and strong Asian business helped Apple's quarterly results beat Wall Street's expectations. Sales of its iconic products far outpaced forecasts, helping drive a near doubling of revenue in the fiscal third quarter.

China is showing phenomenal strength for Apple and was up six-fold, Wells Fargo analyst Jason Maynard said. This remains a huge opportunity for Apple and, in our view, is a major differentiator for the company. Apple has been able to successfully monetize China where competitors have been challenged.

RESET BUTTON

Bank of America Merrill Lynch and Wells Fargo raised their estimates on Apple's yearly earnings by 10 and 13 percent. Caris & Co raised their price target to $600 from $500, while Brigantine Advisors raised their target on the stock to $450 from $400.

We find Apple's valuation compelling, particularly based on the upside potential from revenue and earnings growth in the Mac/PC and iPhone segments and from gross margins, Bank of America Merrill Lynch said in a note to clients.

Apple moved 20.34 million iPhones during the quarter, which analysts say helped it vault past Nokia and Samsung Electronics to become the world's biggest smartphone maker.

While iPhones remain the flagship device, the company touted its new line of Intel-powered Macs on Wednesday and the latest version of its operating software, the multi-touch enabled Mac OS X Lion.

Mac shipments have helped Apple make the top-three among PC vendors in the United States, the first time it has done so in years, according to research firm Gartner.

Analysts worry that the success of the iPad will take away from not just Microsoft Windows PC sales, but also Apple's Mac business, something the company dismisses.

It's taking away from the PC. When we surveyed people who buy iPads, more of them were choosing it instead of a computer, marketing chief Phil Schiller told Reuters.

More are choosing it instead of a Windows computer than choosing it instead of a Mac.

(Additional reporting by Jennifer Saba in New York, writing by Edwin Chan)