Here's an interesting factlet from Bruce Bartlett. He's addressing the question of whether a "technical" default — i.e., one in which the Treasury Department misses payments to bondholders for just a few days — would affect interest rates. It turns out that we actually have a case study on just this question:
Some may think that a rise in rates would be temporary. But there was a case back in 1979 when a combination of a failure to increase the debt limit in time and a breakdown of Treasury’s machines for printing checks caused a two-week default. A 1989 academic study found that it raised interest rates by six-tenths of a percentage point for years afterward.
Yikes! Six-tenths of a percentage point is a lot of money. My back-of-the-envelope chicken scratching suggests that if this happens again it would cost the government something like $50-100 billion per year. In other words, no matter what debt ceiling deal we reach, upwards of half of it could be wiped out by higher interest costs if it comes too late to prevent default on the debt.
That probably won't happen, since even in the worst case I assume that Treasury will prioritize debt payments ahead of everything else (and Treasury's check printers will continue to function). But that's still a mighty big chunk of money to be gambling with.