Fitful spring sunshine is warming the neo-gothic limestone of the Houses of Parliament, and the knots of tourists wandering round them, but in a basement cafe on Millbank it is dark, and quiet, and Joseph Stiglitz is looking as though he hasn't had quite enough sleep. For two days non-stop he has been talking - at the LSE, at Chatham House, to television crews - and then he is flying to Washington to testify before Congress on the subject of his new book. Whatever their reservations - and there will be a few - representatives will have to listen, because not many authors with the authority of Stiglitz, a Nobel prize-winner in economics, an academic tempered by four years on Bill Clinton's Council of Economic Advisers and another three as chief economist at the World Bank (during which time he developed an influential critique of globalisation), will have written a book that so urgently redefines the terms in which to view an ongoing conflict. The Three Trillion Dollar War reveals the extent to which its effects have been, and will be, felt by everyone, from Wall Street to the British high street, from Iraqi civilians to African small traders, for years to come.

Some time in 2005, Stiglitz and Linda Bilmes, who also served as an economic adviser under Clinton, noted that the official Congressional Budget Office estimate for the cost of the war so far was of the order of $500bn. The figure was so low, they didn't believe it, and decided to investigate. The paper they wrote together, and published in January 2006, revised the figure sharply upwards, to between $1 and $2 trillion. Even that, Stiglitz says now, was deliberately conservative: "We didn't want to sound outlandish."

So what did the Republicans say? "They had two reactions," Stiglitz says wearily. "One was Bush saying, 'We don't go to war on the calculations of green eye-shaded accountants or economists.' And our response was, 'No, you don't decide to fight a response to Pearl Harbour on the basis of that, but when there's a war of choice, you at least use it to make sure your timing is right, that you've done the preparation. And you really ought to do the calculations to see if there are alternative ways that are more effective at getting your objectives. The second criticism - which we admit - was that we only look at the costs, not the benefits. Now, we couldn't see any benefits. From our point of view we weren't sure what those were."

Appetites whetted, Stiglitz and Bilmes dug deeper, and what they have discovered, after months of chasing often deliberately obscured accounts, is that in fact Bush's Iraqi adventure will cost America - just America - a conservatively estimated $3 trillion. The rest of the world, including Britain, will probably account for about the same amount again. And in doing so they have achieved something much greater than arriving at an unimaginable figure: by describing the process, by detailing individual costs, by soberly listing the consequences of short-sighted budget decisions, they have produced a picture of comprehensive obfuscation and bad faith whose power comes from its roots in bald fact. Some of their discoveries we have heard before, others we may have had a hunch about, but others are completely new - and together, placed in context, their impact is staggering. There will be few who do not think that whatever the reasons for going to war, its progression has been morally disquieting; following the money turns out to be a brilliant way of getting at exactly why that is.

Next month America will have been in Iraq for five years - longer than it spent in either world war. Daily military operations (not counting, for example, future care of wounded) have already cost more than 12 years in Vietnam, and twice as much as the Korean war. America is spending $16bn a month on running costs alone (ie on top of the regular expenses of the Department of Defence) in Iraq and Afghanistan; that is the entire annual budget of the UN. Large amounts of cash go missing - the well-publicised $8.8bn Development Fund for Iraq under the Coalition Provisional Authority, for example; and the less-publicised millions that fall between the cracks at the Department of Defence, which has failed every official audit of the past 10 years. The defence department's finances, based on an accounting system inaccurate for anything larger than a grocery store, are so inadequate, in fact, that often it is impossible to know exactly how much is being spent, or on what.

This is on top of misleading information: in January 2007 the administration estimated that the much-vaunted surge would cost $5.6bn. But this was only for combat troops, for four months - they didn't mention the 15,000-28,000 support troops who would also have to be paid for. Neither do official numbers count the cost of death payments, or caring for the wounded - even though the current ratio of wounded to dead, seven to one, is the highest in US history. Again, the Department of Defence is being secretive and misleading: official casualty records list only those wounded in combat. There is, note Stiglitz and Bilmes in their book, "a separate, hard-to-find tally of troops wounded during 'non-combat' operations" - helicopter crashes, training accidents, anyone who succumbs to disease (two-thirds of medical evacuees are victims of disease); those who aren't airlifted, ie are treated on the battlefield, simply aren't included. Stiglitz and Bilmes found this partial list accidentally; veterans' organisations had to use the Freedom of Information Act in order to get full figures (at which point the ratio of injuries to fatalities rises to 15 to one). The Department of Veterans Affairs, responsible for caring for these wounded, was operating, for the first few years of the war, on prewar budgets, and is ruinously overstretched; it is still clearing a backlog of claims from the Vietnam war. Many veterans have been forced to look for private care; even when the government pays for treatment and benefits, the burden of proof for eligibility is on the soldier, not on the government. The figure of $3 trillion includes what it will cost to pay death benefits, and to care for some of the worst-injured soldiers that army surgeons have ever seen, for the next 50 years.

By way of context, Stiglitz and Bilmes list what even one of these trillions could have paid for: 8 million housing units, or 15 million public school teachers, or healthcare for 530 million children for a year, or scholarships to university for 43 million students. Three trillion could have fixed America's social security problem for half a century. America, says Stiglitz, is currently spending $5bn a year in Africa, and worrying about being outflanked by China there: "Five billion is roughly 10 days' fighting, so you get a new metric of thinking about everything."

I ask what discoveries Stiglitz found the most disturbing. He laughs, somewhat mirthlessly. "There were actually so many things - some of it we suspected, but there were a few things I couldn't believe." The fact that a contractor working as a security guard gets about $400,000 a year, for example, as opposed to a soldier, who might get about $40,000. That there is a discrepancy we might have guessed - but not its sheer scale, or the fact that, because it is so hard to get insurance for working in Iraq, the government pays the premiums; or the fact that, if these contractors are injured or killed, the government pays both death and injury benefits on top. Understandably, this has forced a rise in sign-up bonuses (as has the fact that the army is so desperate for recruits that it is signing up convicted felons). "So we create a competition for ourselves. Nobody in their right mind would have done that. The Bush administration did that ... that I couldn't believe. And that's not included in the cost the government talks about."

Then there was the discovery that sign-up bonuses come with conditions: a soldier injured in the first month, for example, has to pay it back. Or the fact that "the troops, for understandable reasons, are made responsible for their equipment. You lose your helmet, you have to pay. If you get blown up and you lose your helmet, they still bill you." One soldier was sued for $12,000 even though he had suffered massive brain damage. Some families have had to buy their children body armour, saving the government costs in the short term; those too poor to afford it sustain injuries that the government then has to pay for. Then there's the fact that it was not until 2006, when Robert Gates replaced Donald Rumsfeld as secretary of defence, that the DOD agreed to replace Humvees with mine-resistant ambush-protected (MRAP) armoured vehicles, which are much more able to repel roadside bombs; until that time, IEDs killed 1,500 Americans. "This kind of penny-wise, pound-poor behaviour was just unbelievable."

Yet on another level, Stiglitz is unsurprised, because such decisions are of a piece with the thoroughgoing intellectual inconsistency of the Bush administration. The general approach, he says, has been a "pastiche of corporate bail-outs, corporate welfare, and free-market economics that is not based on any consistent set of ideas. And this particular kind of pastiche actually contributed to the failures in Iraq." There are the well-rehearsed reasons: ignoring international democratic processes while advocating democracy; pushing forward liberalisation before Iraq was ready. Stiglitz's twist on this was the emails he was receiving from the United States Agency for International Development, complaining about the Treasury being obstructive. "They were saying, 'Can you help us? Because we're trying to get businesses to work, but the US Treasury is trying to tighten credit, so there's no money in this country.' "

Then, of course, there is the administration's insistence on "sole-source bidding" - awarding vast, multi-year contracts to Halliburton, for example, instead of putting them out to tender. "An academic might say, 'How can you be a free market, yet demand single-source contracting?'" asks Stiglitz now, mildly - but this is not the way the current administration operates. We know quite a lot now about contractors' excesses, but it is their economic effect that Stiglitz and Bilmes are interested in, and this seems often to have been malign. Free market ideals had, of course, to apply to Iraq, if not to Halliburton (which received at least $19.3bn in single-source contracts), so Paul Bremer, head of the Coalition Provisional Authority, abolished many tariffs on imports, and capped corporate and income tax. Predictably, this led to general asset-stripping, and exposed Iraqi firms to free competition - meaning that many closed down, putting yet more people out of work. ("The benefits of privatisation and free markets in transition economies are debatable, of course," write Stiglitz and Bilmes in their book; a model of understatement, given that Stiglitz is famous for spelling out the harm sustained by poor countries in his book Globalisation and its Discontents (2002), and lost his job at the World Bank for outspokenly making the argument in the first place.) Many reconstruction jobs, in alignment with US procurement law, went to expensive American firms rather than cheaper Iraqi ones - a further waste of resources (one painting job, for example, cost $25m instead of $5m); these American firms, looking to keep their own costs down and profit margins high, imported cheap labour from such countries as Nepal - even though, at this point, one in two Iraqi men was out of work.

This is not, then, pure neocon ideology at work, says Stiglitz: "Ideology of convenience is a better description." It is an ideology illustrated even more clearly in another fact that Stiglitz can't believe - that Bush put through tax cuts while going to war. In Stiglitz and Bilmes's reading, this was downright underhand. Raising taxes, and resorting to the rhetoric of shared sacrifice used in the world wars, for example, would have made Americans more aware of exactly what the war was costing them, and would have provoked opposition sooner. The solution was to borrow the money, at interest of couple of hundred billion dollars a year, which, by 2017, will add up to another trillion dollars or so. This government will be gone in nine months; subsequent administrations, and generations, will have to pay it off.

At the same time, Stiglitz and Bilmes argue, the Federal Reserve colluded in this obfuscation, because it "kept interest rates lower than they otherwise might have been, and looked the other way as lending standards were lowered, thereby encouraging households to borrow more - and spend more." Alan Greenspan, by this account, encouraged people to take on variable-rate mortgages, even as household savings rates went negative for the first time since the Depression. Individuals were taking on unprecedented debt at the same time as a long housing bubble made them feel wealthy (and less concerned with derring-do abroad) - a scenario echoed on this side of the Atlantic.

As we now know, this couldn't continue - in part because of yet another effect of the war. Whatever the much argued reasons for bombing Baghdad, cheap oil has not been the result. In fact, the price of oil has climbed from $25 a barrel to $100 in the past five years - great for oil companies, and oil-producing countries, who, along with the contractors, are the only beneficiaries of this war, but not for anyone else. After calculations based on futures markets, Stiglitz and Bilmes conclude that a significant proportion of this rise is directly due to the disruptions and instabilities caused by Iraq. This price rise alone has cost the US, which imports about 5bn barrels a year, an extra $25bn per year; projecting to 2015 brings that number to an extra $1.6 trillion on oil alone (against which the recent $125bn stimulus package is simply, as Stiglitz puts it, "a drop in the bucket").

Higher oil prices have a direct effect on family, city and state budgets; they also led to a drop in GDP for the US. When interest rates finally rose in response, hundreds of thousands of home owners found that they were unable to keep up payments, triggering the toxic tsunami of defaulted mortgages that has put the US on the brink of recession and brought down Northern Rock - with all the ramifications for British home owners and banks that that has in turn entailed.

Thus, any idea that war is good for the economy, Stiglitz and Bilmes argue, is a myth. A persuasive myth, of course, and in specific cases, such as world war two, one that has seemed to be true - but in 1939, America and Europe were in a depression; there was all sorts of possible supply in the market, but people didn't have the cash to buy anything. Making armaments meant jobs, more people with more disposable income, and so on - but peacetime western economies these days operate near full employment. As Stiglitz and Bilmes put it, "Money spent on armaments is money poured down the drain"; far better to invest in education, infrastructure, research, health, and reap the rewards in the long term. But any idea that war can be divorced from the economy is also naive. "A lot of people didn't expect the economy to take over the war as the major issue [in the American election]," says Stiglitz, "because people did not expect the economy to be as weak as it is. I sort of did. So one of the points of this book is that we don't have two issues in this campaign - we have one issue. Or at least, the two are very, very closely linked together."

And it is the world economy that is at stake, not just America's. The trillions the rest of the world has shouldered include, of course, the smashed Iraqi economy, the tens of thousands of Iraqi dead, the price, to neighbouring countries, of absorbing thousands of refugees, the coalition dead and wounded (before the war Gordon Brown set aside £1bn; as of late 2007, direct operating costs in Iraq and Afghanistan were £7bn and rising). But the rising price of oil has also meant, accoring to Stiglitz and Bilmes, that the cost to oil-importing industrial countries in Europe and the Far East is now about $1.1 trillion. And to developing countries it has been devastating: they note a study by the International Energy Agency that looked at a sample of 13 African countries and found that rising oil prices have "had the effect of lowering the average income by 3% - more than offsetting all of the increase in foreign aid that they had received in recent years, and setting the stage for another crisis in these countries". Stiglitz made his name by, among other things, criticising America's use of globalisation as a bully pulpit; now he says flatly, "Yes, that's part of being in a global economy. You make a mistake of this order, and it affects people all over the world."

And the borrowed trillions have to come from somewhere. Because "the saving rate [in America] is zero," says Stiglitz, "that means that you have to finance [the war] by borrowing abroad. So China is financing America's war." The US is now operating at such a deficit, in fact, that it doesn't have the money to bail out its own banks. "When Merrill Lynch and Citibank had a problem, it was sovereign funds from abroad that bailed them out. And we had to give up a lot of shares of our ownership. So the largest shareowners in Citibank now are in the Middle East. It should be called the MidEast bank, not the Citibank." This creates a precedent of dependence, "and whether we become dependent on Middle East oil money, or Chinese reserves - it's that dependency that people ought to worry about. That is a big change. The amount of borrowing in the last eight years, on top of the borrowing that began with Reagan - that has all changed the US's economic position in the world."

So quite apart from the war, does he think a particular kind of unfettered market has had its day? "Yes. I think that anybody who believes that the banks know what they're doing has to have their head examined. Clearly, unfettered markets have led us to this economic downturn, and to enormous social problems." Combined with the war, whoever inherits the White House faces a crisis of epic proportions. Where do they go from here? "The way that shapes the debate," says Stiglitz, "is that Americans have to say, 'Even if we stay for another two years, just two years, and we're spending $12bn a month up front in Iraq, and it's costing us another 50% in healthcare, disability, bringing it up to $18bn a month in Iraq, and you look at that in another 24 months, we're talking about half a trillion dollars more for two years - forgetting about the economic cost, the ancillary costs, the social costs - just looking at the budgetary cost - not including the interest - you have to say, is this the way we want to spend a half a trillion dollars? Will it make America stronger? Will it make the Middle East safer? Is this the way we want to spend it?"

Far better, he suggests, to leave rapidly and in a dignified manner, and to spend some of it on helping Iraqis reconstruct their own country - and the rest on investing in and strengthening the American economy, so that it can retain its independence, and have the wherewithal, at least, to play a responsible role in the world. The book ends with a list of 18 specific reforms arising from Stiglitz and Bilmes's discoveries, focusing on exactly how to fund and run a war from now on (depend not on emergency funds and borrowing but on surtaxes, for example, so that voters know exactly what it is they are paying for, and can vote accordingly). He has been approached by Barack Obama as a possible adviser should he reach the White House, although he says, "I've gone beyond the age where I would want to be in Washington full time. I would be interested in trying to help shape the bigger picture issues, and in particular the issues associated with America positioning itself in the new global world, and re-establishing the bonds with other countries that have been so damaged by the Bush administration."

I suggest, as devil's advocate, that to count costs in the way he has, and to advise retrenchment, might be seen as encouraging America to return to isolationism. "No. I think that's fundamentally wrong. The problem with Iraq was that it was the wrong war, and the wrong set of issues. Obama was very good about this. He said, 'I'm not against war - I'm just against stupid wars.' And I feel very much the same way. While we were worried about WMD that did not exist in Iraq, WMD did occur in North Korea. To use an American expression, we took our eye off the ball. And while we were fighting in Iraq, Afghanistan got worse, Pakistan got worse. So because we were fighting battles that we couldn't win, we lost battles that we could have." To discover that those lost battles included better healthcare for millions of Americans, a robust world economy, a healthier and more independent Africa, and a more stable Middle East, seems worth a bit of green-eye-shaded number crunching.

In figures

$16bn

The amount the US spends on the monthly running costs of the wars in Iraq and Afghanistan - on top of regular defence spending

$138

The amount paid by every US household every month towards the current operating costs of the war

$19.3bn

The amount Halliburton has received in single-source contracts for work in Iraq

$25bn

The annual cost to the US of the rising price of oil, itself a consequence of the war

$3 trillion

A conservative estimate of the true cost - to America alone - of Bush's Iraq adventure. The rest of the world, including Britain, will shoulder about the same amount again

$5bn

Cost of 10 days' fighting in Iraq

$1 trillion

The interest America will have paid by 2017 on the money borrowed to finance the war

3%

The average drop in income of 13 African countries - a direct result of the rise in oil prices. This drop has more than offset the recent increase in foreign aid to Africa

·The Three Trillion Dollar War, by Joseph Stiglitz and Linda Bilmes, is published by Allen Lane, price £20. To order a copy for £18 with free UK p&p, go to theguardian.com/bookshop or call 0870 836 0875.