Donald Trump repeated his call to "drain the swamp," knocking the "failed elites in Washington" for being wrong about everything from foreign policy to health care.

"The people opposing us are the same people — and think of this — who’ve wasted $6 trillion on wars in the Middle East — we could have rebuilt our country twice — that have produced only more terrorism, more death, and more suffering – imagine if that money had been spent at home," Trump said at a Oct. 26 rally in Charlotte, N.C.

"We’ve spent $6 trillion, lost thousands of lives," Trump said. "You could say hundreds of thousands of lives, because look at the other side also."

The United States has listed nearly 7,000 casualties from the wars in Iraq and Afghanistan. For this fact-check, however, we wanted to focus on Trump’s claim that the United States has spent $6 trillion on the wars.

Is that right?

What we found is that Trump confused what’s been spent, and what is projected to be spent. That said, he’s right to note the large cost of U.S. intervention in the Middle East.

The Congressional Research Service estimated in 2014 that the Iraq and Afghanistan wars (mainly the cost of operations) had cost the United States about $1.6 trillion from 2001 to 2014. Here’s the breakdown:

• $686 billion for Operation Enduring Freedom (Afghanistan)

• $815 billion for Operation Iraqi Freedom and Operation New Dawn

• $27 billion for Operation Noble Eagle, enhancing security at military bases

• $81 billion for programs and activities not directly related to war operations

But those figures only include direct expenditures. More comprehensive analyses show trillions of dollars in additional spending.

A recent Brown University study, for example, pinned the cost of the wars in Iraq, Afghanistan, Pakistan and Syria at about $3.6 trillion from 2001 to 2016, using the $1.6 trillion operations costs as a baseline but also accounting for counterterrorism costs.

Adding in money appropriated for war spending and on homeland security in 2017, the total reaches $4.79 trillion. This figure also includes future obligations for veterans medical and disability costs ($1 trillion through 2053) as well as interest on borrowing for wars.

Here’s a specific breakdown from the study:

A 2013 Harvard University working paper came up with an even higher cost: $4 trillion to $6 trillion for just Iraq and Afghanistan. Like the Brown study, the Harvard paper estimated that future medical care and disability benefits for veterans of these war will near $1 trillion.

The Harvard paper also attributes $750 billion in Pentagon medical and personnel costs to the Iraq and Afghanistan wars and also considers the cost of nation-building in the two countries.

Our ruling

Trump said the wars in the Middle East have cost $6 trillion dollars.

Trump is citing the high-end estimate of credible analyses of spending associated with the wars in Iraq and Afghanistan. Yet he is confusing money that’s been spent with money that researchers say will be spent.

That’s a $1 trillion difference or more.

Trump’s statement is partially accurate but leaves out important details. We rate it Half True.