Deborah Lucas has studied this question, and here is the core of her results:
This review develops a theoretical framework that highlights the principles governing economically meaningful estimates of the cost of bailouts. Drawing selectively on existing cost estimates and augmenting them with new calculations consistent with this framework, I conclude that the total direct cost of the 2008 crisis-related bailouts in the United States was on the order of $500 billion, or 3.5% of GDP in 2009. The largest direct beneficiaries of the bailouts were the unsecured creditors of financial institutions. The estimated cost stands in sharp contrast to popular accounts that claim there was no cost because the money was repaid, and with claims of costs in the trillions of dollars. The cost is large enough to suggest the importance of revisiting whether there might have been less expensive ways to intervene to stabilize markets. At the same time, it is small enough to call into question whether the benefits of ending bailouts permanently exceed the regulatory burden of policies aimed at achieving that goal
You will note that 3/4 of that sum comes from the bailouts of the government mortgage agencies. I am myself uncertain how to think about this problem. First, is it useful to think of the additional bailout expenditure as being monetized, if only indirectly through the mix of Fed/Treasury policy? If yes (debatable), and the monetization itself limits a harmful further deflation, can it be said that this monetization is not a transfer away from citizens in the usual sense that an inflation in Zimbabwe might be? But rather a net gain for citizens or at least a much smaller loss? Is the interest paid on those monetized reserves the actual cost?
In any case, where exactly does the “3.5% of gdp” loss “come from”?
I do not know!