In 2007 dollars. (via Daily Kos)
Iraq and Afghanistan To Date – $695.7 billion
Compare to other wars…
World War II – $3.2 trillion
Vietnam War – $670 billion
World War I – $364 billion
Korean War – $295 billion
Persian Gulf War – $94 billion
Civil War (both Union and Confederate costs) – $81 billion
Spanish-American War – $7 billion
American Revolution – $4 billion
Mexican War – $2 billion
War of 1812 – $1 billion
Source: Congressional Research Service and Office of Management and Budget data.