The U.S. government has released updated data on the cost of current and past wars. This updated data (all costs in current dollars, adjusted for inflation) show that;
American Revolution (1776-83) cost $2.4 billion
War of 1812 (1812-15) cost $1.55 billion.
Mexican War (1846-49) cost $2.38 billion
Civil War (1861-65) cost $79.74 billion (75 percent for the Union forces)
Spanish American War (1898-99) cost $9.04 billion.
World War I (1917-21) cost $334 billion
World War II (1941-45 ) cost $4.1 trillion
Korean War (1950-53) cost $341 billion
Vietnam (1965-75) cost $738 billion
Persian Gulf War (1990-91) cost $102 billion
Afghanistan War and Other War-On-Terror Operations (2001-10) cost $321 billion
Iraq War (2003-10) cost $784 billion
Those costs mean a lot more if you take GDP into account, and the ability of the country to pay for a war without causing great economic privation among the tax payers. Thus the pre-1850s wars only consumed 1-2 percent of GDP while they were going on. But when the Civil War came along, the United States was already experiencing the Industrial Revolution. There was a lot more money available, and thus consumed about 10 percent of GDP for the Union (and more for the Confederacy, which was much less industrialized). The Spanish American War was a small conflict, in terms of GDP (requiring only about one percent).
Going into the 20th century, the U.S. was the mightiest industrial power on the planet, and incredibly wealthy. Despite costing four times as much as the Civil War, World War I consumed the same percentage of GDP. World War II cost more than ten times as much as World War I, but only required three times as much GDP. Korea continued that trend, consuming less than four percent of GDP. Vietnam cost more than twice as much as Korea, but consumed half as much GDP. The Persian Gulf War consumed about a quarter of one percent of GDP. Both the Iraq and Afghan wars together have consumed only about one percent of GDP, less of a financial burden than any of the 19th century wars, except the Civil War.
As a percentage of GDP, military spending continues a decline that has been going on since the 1960s (when, because of the Vietnam war, defense spending was 10.7 percent of GDP). That went down to 5.9 percent of GDP in the 1970s and, despite a much heralded defense buildup in the 1980s, still declined in the 1980s (to 5.8 percent.) With the end of the Cold War, spending dropped sharply again in the 1990s, to 4.1 percent. For the first decade of the 21st century, defense spending is expected to average 3.5 percent of GDP. Most of the current defense budget is being spent on personnel (payroll and benefits), and buying new equipment to replace the Cold War era stuff that is wearing out and to pay for operations in Iraq and Afghanistan. This trend is all because of the industrial revolution of the 19th century, which created a lot more money, much of which nations promptly squandered on wars they could not have afforded earlier.
U.S. military operations in Iraq, Afghanistan and elsewhere have, since September 11, 2001, cost about $1.15 trillion. That seems like a lot, and it is. But it's not a lot like it used to be. For example, World War II cost, at the time (in current dollars) $4.1 trillion dollars. That amounted to over 33 percent of U.S. GDP. The current war on terror is costing about one percent of GDP. So while war may appear to be getting more expensive, relative to the amount of money available, it's actually getting cheaper.
The initial cost of World War II, and most wars that came after it, will eventually double because of the cost of taking care of the veterans. There were over a million casualties in World War II, many of them serious, with long range effects. The long range health problems were not anticipated, nor were the more expensive treatments. You have to pay. The vets are owned a debt that cannot be avoided.
The United States has always been enthusiastic about spending enormous amounts on weapons, ammunition, supplies and equipment for the troops, with the idea of keeping U.S. casualties down while still winning the war. Thus during World War II, U.S. combat deaths were 300,000 (plus 100,000 non-combat dead). The Soviet Union, on the other end of this scale, lost 10.7 million dead in combat (including 4.4 million captured and missing), and nearly 20 million civilians killed as well. Of all the major combatants in World War II, the U.S. had the lowest casualty rate (about 2 percent). Russia lost about 15 percent of its entire population during the war.
The U.S. kept its losses down partly because of the amount of money spent per person in the military (over $250,000). The current casualty rate is a third of what it was during World War II, and the amount spent per person has more than tripled (exact comparison is tricky, as all military expenses were counted during World War II, while the current war is being fought with only a small portion of American military might, and the navy and air force continue to take care of many non-war-on-terror responsibilities.) While the dollar cost of war is good for a hot headline on a slow news day, the fact that the money saved lots of American lives, never seems to make it to the front page.