Elevation Partners, one of Palm’s largest investors, came out a lot better than most expected when Palm finally sold to outside suitor HP for $1.2 billion.

Elevation, the firm started by Silicon Valley investor Roger McNamee, actually made $25 million, according to people familiar with the matter. Elevation would not speak on the record for this story.

That’s surprising for many outsiders, because most assumed Elevation would completely bomb. After all, Palm’s stock has declined badly since Elevation got involved. Elevation invested in Palm two years ago at a price of about $8.50 per share. But Palm’s stock eroded over the last year, as the company fumbled its product releases, and was scooped up for a mere $5.70 per share by HP in the acquisition announced today. So how did Elevation come out on top?

From VentureBeat
Customers don’t just get irritated when you screw up cross-channel personalization. They jump ship. Find out how to save your bacon on this free research-based webinar with Insight’s Andrew Jones.

Well, it has to do with the infamous “liquidation preference,” or the special clause in an investment contract that investors insert in order get their money “out” of a deal before anyone else gets theirs out.

Here’s the math, which shows that Elevation invested a total of $460 million, and based on transaction prices, received approximately $485 million. It’s a bit complex, because Elevation made several investments over the years, and they each turned out differently. Add them all up, however, and Elevation came out on top:

1) In 2007, Elevation invested $325 million into Palm at $8.50 per share. For that, Elevation got 38.2 million convertible preferred shares. These shares contained the liquidation preference, which gave the firm very nice protection against the downside. So even though HP bought Palm at a price of $5.70 today, Elevation didn’t actually sell these preferred shares for that low a number. Under its liquidation preference, it pulled out its original $325 million, so it didn’t suffer any loss. So who did suffer the loss? Well, the other shareholders, most of them common — regular employees, for example — who did not enjoy the protection clause.

2) In 2008, Elevation put in another $51 million, gaining 15.7 million convertible preferred shares at $3.25 a share, as well as 3.6 million warrants that had a strike price at $3.25. Again, Elevation was clever when it negotiated the warrants. With the acquisition, those warrants covert to equity, and because it made $2.45 on each of those warrants ($5.70 minus $3.25), it made a total of $8.8 million on those.

3) In March 2009, Elevation invested again, pumping $49 million into Palm for 8.2 million common shares at $6 a piece. Then in September 2009, Elevation invested $35 million at price of $16.25 per share, which got them another 2.2 million common. Here, of course Elevation didn’t protect itself, and it took a loss on the common just like the other shareholders.

Bottom line, here’s how it adds up:

Elevation got its full original $325 million investment returned, and then got another $149 million from the remaining convertible preferred shares plus the common shares, and then $8.8M from the warrants. That makes a total of $484.8 returned from $460 invested.

So while this deal was by no means a success — Elevation would have wanted to return hundreds of millions to justify it to its investors — at least it didn’t lose its shirt on the deal.