Leo Apotheker will take home $7 million in severance pay and $18 million in stock as a result of his ouster as HP CEO.

NEW YORK (CNNMoney) -- Hewlett-Packard's CEO revolving door is costing the company a fortune.

On the job as chief executive for not even 11 months, Leo Apotheker will leave HP (HPQ, Fortune 500) a wealthy man: He has already taken home most of his $1.2 million annual salary, a $4 million signing bonus, and an additional $4.6 million awarded for relocation assistance and to offset payments that he forfeited from his previous employer, SAP.









Apotheker was ousted on Thursday, but he'll collect more money on his way out the door. The former CEO will take home $7.2 million in cash as severance, plus $18 million more in stock.

According to the employment agreement HP signed with Apotheker in September 2010, the company will owe him twice his salary and twice his average performance bonus in cash as a goodbye payment. Since Apotheker didn't stick around long enough to collect a performance bonus, the company will just use his bonus target as the "average," which is equal to twice his salary.

Additionally, nearly all of Apotheker's stock grants will vest immediately, giving him access to about 800,000 shares of HP. Apotheker had not stayed on long enough to see any of his stock grants vest on the planned schedule -- most were supposed to be given to him annually over the course of two years. Only one stock grant, a 120,000-share grant that was supposed to be doled out gradually as a three-year reward, will be pro-rated.

At today's closing share price of $22.80, those grants will be worth $18.2 million. Combined with the cash, Apotheker will take home $25.4 million.

Apotheker is just one of three HP CEOs to be ousted in the past six years.

Mark Hurd, who exited HP scandalously, received a cash severance payment of $12.2 million. He was eligible for about $53 million in pay and perks upon his termination, but in a settlement with HP over his decision to take an executive job at Oracle (ORCL, Fortune 500), Hurd opted to drop all of his equity grants.

HP CFO Cathie Lesjak filled the gap between Hurd and Apotheker. As thanks for her three-month CEO stint, she was granted a $1 million cash bonus and $2.6 million in stock grants in recognition of her "exceptional service," according to a regulatory filing.

And Carly Fiorina, who resigned (read: was shoved out the door) as CEO in 2005, was given a $21.4 million cash severance in addition to another $21.1 million in stock grants.

In all, the ousters of its past three CEOs, including the bonus for the interim CEO, have cost HP $83.3 million.