Though it lasted fewer than four years, World War II was the most expensive war in United States history. Adjusted for inflation to today's dollars, the war cost overR$4 trillion and in 1945, the war's last year, defense spending comprised about 40% of gross domestic product (GDP).