Donald Trump’s critics say Mexico can’t or won’t pay for a wall at the border, which he says is hogwash.

"When they say ‘but Mexico can't pay for the wall,’ I say of course they can," said the Republican frontrunner at a town hall in Norwalk, Iowa, on Jan. 20. "We have a trade deficit with Mexico that's unbelievably big. Humongous. It's a humongous number. It's billions and billions of dollars -- far more than what we're talking about for the wall. The wall's peanuts compared to that."

Trump’s statement prompted these questions: What is the amount of the trade deficit and the cost to build the wall? Mostly importantly, does a big trade deficit mean the Mexican government has money to pay for a wall?

The Trump campaign did not respond for this fact-check.

The size of the trade deficit

The U.S.-Mexico trade deficit was $50 billion for 2014. It was about $54 billion for the first 11 months of 2015. That means Mexico sold the United States $54 billion more in goods and services than the United States sold to Mexico.

Balanced trade -- in which exports and imports are equal -- is rare. The U.S. economy has run overall trade deficits in every year since 1976.

Sorting out the costs to build a wall is messier.

Cost of a border wall

The border with Mexico is about 1,900 miles. Federal law in 2006 required the construction of an approximately 700-mile fence.

Border fencing and associated costs added up to about $6 billion as of 2012.

"It’s a lot more expensive than we expected when we started, and it was much more difficult," said Ronald Vitiello, deputy chief of the U.S. Border Patrol for U.S. Customs and Border Protection, before a Senate committee in May.

But the costs have left Trump, who promised to "build a great wall," undeterred. His immigration plan includes no price tag, although he wants to force Mexico to pay for it by taking money from remittances and jacking up fees on visas.

News reports estimating the price of a wall have varied widely. For the fence already built, the costs fluctuated depending upon the terrain. A Congressional Research Service report noted in 2009 that the challenges include "costs versus benefits, location, design, environmental impact, potential diplomatic ramifications, and the costs of acquiring the land needed for construction."

Media reports we saw to complete such a wall ranged from $5.1 billion to $25 billion — plus additional costs to maintain it.

"The only way to come up with any type of real cost estimate, you would have to do what we did: Get the Army Corps of Engineers or somebody else to survey and plan and come up with a fence type, and environmental impacts," said Thad Bingel, a senior official at Customs and Border Patrol during the George W. Bush administration.

From an engineering standpoint, it’s possible to do it. But the cost would be enormous, and it would be more efficient to invest in equipment or staff, he said.

"Largely the reason we didn’t fence those portions was Border Patrol didn’t think we needed fencing there," because those portions had a river, mountains or a lot of desert, Bingel said.

Trade deficit has nothing to do with cost of the wall

So let’s review what we know so far: The trade deficit is about $50 billion. It’s difficult to pinpoint a price to build the wall, although the estimates we saw were smaller than the deficit.

However, the bigger problem with Trump’s statement is he suggested Mexico can afford to pay for the wall because of the amount of the trade deficit. There is no proof of that.

Several experts told PolitiFact that there is no connection between the size of the trade deficit and finding money to build the wall.

"Trump’s connection of the trade deficit with a Mexican border fence is just nonsense," said Alex Nowrasteh, an immigration expert at the libertarian Cato Institute. "Just because the Mexican economy has a trade surplus relative to the United States doesn’t mean the Mexican government has the resources to build a border wall. It would be like me threatening my neighbor to build a new fence or else I’ll stop shopping at Walmart."

Mark Perry, a University of Michigan professor and scholar at the conservative American Enterprise Institute, said the trade deficit is based mostly on trading and investment by private individuals and companies -- not the government itself.

"It’s not like there is $54 billion sitting around somewhere in Mexico, like a magic pile of dollars, that could be used to build a wall," he said.

The Mexican government does not have adequate funds to pay for health, education or roads -- much less build a wall, said Gary Hufbauer of the Peterson Institute for International Economics, a think tank that analyzes globalization.

"The trade surplus does not represent money in some idle bank account controlled by the Mexican government," he said.

Our ruling

Trump said, "When they say Mexico can't pay for the wall, I say of course they can. We have a trade deficit with Mexico that's unbelievably big. ... It's billions and billions of dollars -- far more than what we're talking about for the wall."

The trade deficit is about $50 billion. Estimates to build a wall vary widely, though the ones we saw were smaller than the trade deficit. It’s impossible to know a precise figure because Trump hasn’t offered a detailed plan.

However, Trump’s overall message here is misleading because he suggests that the size of the trade deficit is proof that Mexico could pay for the wall. In reality, the trade deficit has nothing to do with whether the Mexican government could afford to write the United States a check to build the wall.

We rate this statement False.

Update: The original version of this fact-check used a paraphrase of Trump's statement as its ruling statement that was in error. (It should have referred to Mexico's trade surplus with the U.S., not deficit.) We have replaced the ruling statement with his quote.