Paul Krugman explains: I Heard It Through The Baseline.
Short version: S&P used the wrong baseline when making its calculations. Slightly longer explanation at the Krugman link above. An even long one via the Treasury: Just the Facts: S&P’s $2 Trillion Mistake, which includes:
S&P has said their decision to downgrade the U.S. was based in part on the fact that the Budget Control Act, which will reduce projected deficits by more than $2 trillion over the next 10 years, fell short of their $4 trillion expectation for deficit reduction. Clearly, in that context, S&P considers a $2 trillion change to projected deficits to be very significant. Yet, although S&P’s math error understated the deficit reduction in the Budget Control Act by $2 trillion, they found this same sum insignificant in this instance.
Back to Krugman:
So what we just saw was amateur hour. And these people are pronouncing on US credit-worthiness?