If @FannieMae had been treated like other companies that received TARP bailouts, they would have been subject to an interest rate of 5% for the first five years and 9% thereafter. However, since they were paying a 10% interest rate to the Treasury from 2009 to 2012, I credited them with a 5% overpayment each year during those years. This example has the loan paid back at the end of 2013. 

2008:
Borrowed: $15.2 billion

2009:

Borrowed: $60.9 billion

No interest calculated

Overpayment of interest (5% of 2008 balance): $15.2 billion * 0.05 = $0.76 billion

Balance after overpayment adjustment: $15.2 billion + $60.9 billion - $0.76 billion = $75.34 billion

2010:

Borrowed: $2.6 billion

No interest calculated

Overpayment of interest (5% of 2009 balance): $75.34 billion * 0.05 = $3.767 billion

Balance after overpayment adjustment: $75.34 billion + $2.6 billion - $3.767 billion = $74.173 billion

2011:

No new borrowings

No interest calculated

Overpayment of interest (5% of 2010 balance): $74.173 billion * 0.05 = $3.709 billion

Balance after overpayment adjustment: $74.173 billion - $3.709 billion = $70.464 billion

2012:

No interest calculated for 2011 balance, only overpayment adjustment

Overpayment of interest (5% of 2011 balance): $70.464 billion * 0.05 = $3.523 billion

Balance before sweep: $70.464 billion - $3.523 billion = $66.941 billion

Net Worth Sweep in 2012:

Sweep: $11.6 billion (This reduces the principal)

Balance after sweep: $66.941 billion - $11.6 billion = $55.341 billion

2013:

Interest (5% on 2012 balance): $55.341 billion * 0.05 = $2.767 billion

Balance before sweep: $55.341 billion + $2.767 billion = $58.108 billion

Sweep: $59.4 billion

Balance after sweep: $58.108 billion - $59.4 billion = -$1.292 billion (Overpayment; we'll consider this as paid off) $fnma