This account is pending registration confirmation. Please click on the link within the confirmation email previously sent you to complete registration.Need a new registration confirmation email? Click here

Now the company is more like a healthy teenager. The kind who goes to college on his parents' money, gets in trouble at frat parties, but who you just know is going to wind up selling insurance with a trophy wife and lots of friends down the road.

That seems to be Wall Street's view. Despite Facebook's small problems and missteps, investors are finally taking to the biggest initial public offering of 2012. The stock is up 85% year to date and opened today at around $49 a share -- well above its IPO price of $38 a share.

The reason is that the company has learned how to create revenue and profits. Just like that teenager figures how to charge fellow students for a keg, or use charm to make the school paper profitable, Facebook now has sustainable ad revenue and fat margins.

Revenue rose over the first six months of this year from $1.45 billion to $1.81 billion, and operating margins are close to 33%. That doesn't all fly to the bottom line because Facebook is paying hefty taxes, $133 million on the first quarter's $353 million in income, $212 million on the second quarter's $545 million.

It's easy to argue that Facebook is overpriced, looking at its current price-to-earnings multiple of 185. With a market cap of almost $120 billion, it's selling at almost 12 times the most optimistic view on 2013 revenue, $10 billion.

But that's reasonable compared with
Amazon's(AMZN). Cash flow is also accelerating, with more than $2 billion in operating cash during the second quarter alone, and positive changes in net cash over three of the last four quarters.

The big expenses now seem baked in, like Facebook's cloud-computing centers. Investing cash flow was a negative $7 billion last year, but has run at just negative $1.1 billion this year, which operations more than offset.

Facebook's business model is also easier to understand now. It's a company that builds profitable cloud-computing applications and mobile apps, which it releases in a steady stream and usually monetizes with advertising.