AIG Bailout Exit Plan : Planet Money AIG says it has a plan to repay the megabailout it received. Here's how it's supposed to work.

AIG Bailout: We May Actually Get Our Money Back

AIG says it has a plan to repay the megabailout it received from the government. Tim Geithner says it sounds good to him.

The math does seem to pencil out; if everything goes according to plan, the government should get its money back. But it will take a while.

Here's how it's supposed to work:

The company is unloading some big assets to generate cash. An IPO is in the works for AIG's Asian life insurance business (called AIA) and it's selling another foreign arm to MetLife.

AIG will use the money from those sales to pay back the roughly $46 billion it owes the New York Fed. (There's a bit more to it than this; for the full explanation, see this statement from the company.)

On top of that, the U.S. Treasury has put $49.1 billion into AIG. In exchange for all that money, the government will get about 1.65 billion shares of stock in the company.

In other words, the U.S. is paying a bit less than $30 a share. This afternoon, after the deal was announced, existing shares of AIG were trading at around $39.

The Treasury is supposed to get its stock at the beginning of next year. Then it'll start selling shares on the open market. It's unclear how long it will take to sell everything -- but this WSJ article suggests it'll probably be more than a year.

If the stock price holds up while the government unloads all those shares -- or even if the price doesn't fall too precipitously -- Treasury should at least break even, Phillip Phan of the Johns Hopkins B-school told me this afternoon.

That still leaves one other piece of the AIG bailout that wasn't addressed in today's news: Maiden Lane.

During the acute phase of the crisis, the New York Fed loaned about $44 billion to Maiden Lane II and Maiden Lane III -- two special companies that were created to buy toxic assets from AIG.

About $15 billion of that has been repaid so far. The Fed says the value of the assets in Maiden Lane II and III has held up, and it expects to get its money back eventually.