Greg Mankiw's blog provides estimates of the cost of military operations in Irag, Afghanistan and the war on terrorism from the Congressional Budget Office.
The estimated present value of costs from 2001-2017 is between $1.2-$1.7 trillion. This is, of course, a vast amount. But it is quite a bit smaller than the estimates of Linda Bilmes and Joseph Stiglitz (here) which came up with a figure of up to several trillion dollars for the war in Iraq alone. I discussed the BS estimates in an earlier post. The CBO exclude general macroeconomic costs - such as interest rate effects of the war which BS consider but quite a few of the BS estimates just seem too high.
The amount appropriated to the US Department of Defence for these activities in 2007 was $604 billion.
These estimates consider costs alone not benefits. They do however provide a dramatic illustration of the opportunity cost of these activities.