The federal government’s massive effort to save the financial system carries a price tag that has soared into the trillions. Where will all that money come from?

How much have the bailouts cost?

Counting the money that has either been spent or promised in the form of loan guarantees, the figure now approaches a hard-to-fathom $8.5 trillion. For perspective, that’s more than the government spent, in inflation-adjusted dollars, on the Louisiana Purchase, the entire New Deal, and the Vietnam and Korean wars—combined. The bailouts have been coming at such a feverish pace that it’s hard to keep up, but they include everything from outright purchases of $500 billion in mortgage-backed securities to guarantees on $388 billion of Citigroup and General Electric debt. Just one of the bailouts, of insurer AIG, cost $150 billion.

Where does the money come from?

Technically, it comes from the federal Treasury. But there’s a problem. Even before the current financial crisis erupted, the U.S. was spending hundreds of billions more than it was collecting, leaving a budget deficit of nearly $400 billion dollars. So to pay for all the additional financial commitments the government has taken on in recent months, the Treasury has had to borrow hundreds of billions more. To do that, it has been selling bonds on the global bond market.

How exactly does that work?

Once a week, the Treasury Department, working through a syndicate of banks, conducts auctions for bonds—which come due in anywhere from 30 days to 30 years. The Treasury deposits the proceeds of the bond sales to its account at the Federal Reserve Bank of New York. Then the government turns around and lends the bond revenues to Citigroup, AIG, and the other bailout recipients. It’s this process that people refer to when they say the Treasury is “printing money,’’ because the funds are essentially created out of nothing. Everything is done electronically, however; no physical bonds or cash actually exchange hands.

How much have we borrowed?

A staggering amount. The national debt currently stands at $10.6 trillion and is rising fast, since the Treasury is currently borrowing roughly $550 billion per quarter. About half the debt is money the government owes to itself—some of the biggest buyers of Treasury bonds are the Social Security Trust Fund and other entitlement programs. The remainder—the so-called public debt—is owed to individuals, institutions, and foreign governments. The federal debt is now so large that taxpayers must pay $412 billion in interest every year—the third largest expense in the government’s $3 trillion operating budget.

Can we afford that?

Yes, at least in the short term. The national public debt is about 39 percent of the annual U.S. output of goods and services, or gross domestic product. That sounds like a lot, and it is. But it’s actually in line with the debt-to-GDP ratio of the past two decades, and far less than during World War II, when the debt-to-GDP ratio topped 100 percent.

Who’s lending us all this money?

To a large extent, the rest of the world—especially China, which as of September owned $585 billion in Treasury bonds. The next largest foreign creditors are Japan, with holdings of $573 billion, and Great Britain, with $338 billion. Foreign oil-producing countries own $182 billion of Treasury debt. These countries have one thing in common: They’re major exporters to the U.S., which gives them a lot of U.S. currency that they want to invest. They invest much of those reserves in Treasury bonds.

What if China says ‘no more’?

It might cause a momentary shock, but other countries would likely pick up the slack—thanks, ironically, to the financial crisis. With loans going into default at a record pace, bond buyers trust only the most creditworthy borrowers. The U.S. has never defaulted on its bonds, making it the world’s debtor of choice. “The Treasury, at this point, is viewed as the safest harbor in the world,” says University of Pennsylvania economist Marshall Blume.

What is the effect of all this borrowing?

It could enable the U.S. to spend its way out of the recession. If the U.S. invests its money wisely—and that’s a big if—then all that borrowing could, as Bill Gates said recently, “bring us out of the downturn better off than when we went in.” Many experts say that investments in green technology, education, and infrastructure could lead to improved productivity and drive economic growth. But there is a serious downside: Every dollar invested in Treasury bonds is one less dollar of investment available to the private sector. And the private sector has been the source of most of the innovation that drives profit growth and creates jobs.

Are there other risks?

Yes. All that borrowing by the government, coupled with all the loans that the U.S., in turn, is extending to corporations and consumers, dramatically increases the world’s supply of dollars. With so much currency in circulation, there’s the risk of inflation, which is what happens when too much money chases too few goods. Prices rise, workers demand higher pay to keep up, and a hard-to-control inflationary spiral begins. But that’s a worry for another day. “There are extreme circumstances when a larger national debt is accepted as the lesser of two evils,” says Robert Barbera, chief economist at the Investment Technology Group. Most economists agree that this is one of those times.

China in the catbird seat

Now that China is America’s largest creditor, many observers worry that it could soon effectively have a veto over U.S. policies. Some analysts have noted, for example, that the U.S.’s ability to get tough with Iran is hampered by the fact that Iran is China’s ally; if the U.S. goes too far, according to this theory, China could punish the U.S. by halting its bond purchases. But most experts say such a move could hurt China as much as it would hurt the U.S. China’s economy depends heavily on exports to the U.S., which buys $321 billion in Chinese goods every year. By disrupting America’s economy, China would only be crippling its own. “It’s not in China’s interest to create financial instability,” says Bank of America market strategist Gerald Lucas. Indeed, the precarious world economy gives both countries a strong incentive to work together. “China and the U.S. still need each other,” writes Washington Post columnist David Ignatius, “perhaps now more than ever.”