Taxpayers could make a profit of up to $15.1 billion on the emergency assistance extended to American International Group during the financial crisis, the Government Accountability Office said Monday.

The Federal Reserve and the Treasury made available more than $180 billion in aid to the struggling financial giant in 2008 through a variety of mechanisms, including cash infusions. Since then, the Fed and Treasury have recouped all but $46.3 billion.

The gains have come as a result of Treasury selling stock it owns in AIG, which has once again become profitable, and the Fed selling distressed mortgage securities it had obtained from the company during the crisis.

“Based on the composition of the remaining federal assistance to AIG [and] the repayment and recovery progress thus far on all assistance . . . the government could receive total returns of approximately $15.1 billion in excess of the assistance provided, including interest, dividends, and fees,” the GAO said in its report.

The GAO report noted, however, that those gains do not reflect the “subsidy costs associated with the assistance.” The GAO did not calculate such costs, which relate to the compensation the government received in exchange for taking on great risks in 2008.

Treasury announced late Sunday that it would sell $5 billion in AIG shares at $30.50 a piece. The break-even price for the government is $29.70.

The AIG repayment reflects overall success in federal financial aid programs paying back taxpayers. Treasury has made $25 billion in a mortgage-backed security program and the Federal Reserve has generated $179 billion in additional excess earnings. Banks have paid back $19 billion more than they borrowed.

Still, there are weak spots. Fannie Mae and Freddie Mac, which were also bailed out in 2008, have cost taxpayers $151 billion. Meanwhile, Treasury expects to spend more than $40 billion on housing programs, though much of that has money hasn’t gone out the door yet.