Trade has been taking place for as long as we have a record of interactions among groups of people. Throughout history it has been a recurring factor in economic development and the expansion of prosperity. Yet the notion persists that protecting domestic producers from foreign competition can benefit a country’s economy. President Donald Trump shares this view and thinks that imposing trade barriers can help make the country great again. It won’t.

The prime objection to trade has always been that it hurts domestic industries and costs jobs. Much-cited studies by David Autor and others in 2013 and 2016 concluded that imports from China between 1999 and 2011 cost the U.S. around 2 million manufacturing jobs. This seems like a large number, but it is a small fraction of the jobs eliminated and created in the churning of the vast U.S. job market in any similar period. And in other recent research, Robert Feenstra and his co-authors find that after taking into account new jobs in export-related industries, the net job losses because of trade all but disappear. Many more jobs are lost and created every year because of technological innovation than because of trade. In one case the losses are accepted as normal, but in the other they are an excuse to limit competition.

Some U.S. producers are hurt by trade, but many others benefit by having access to component parts that improve their products and lower their costs. The ultimate beneficiaries, however, are the millions of consumers who have more choices of goods and services, often at lower prices, than would otherwise be the case. These benefits are often ignored because the focus is on jobs in the trade debate.

The history of protectionism is filled with efforts to protect domestic industries, which exact a cost to consumers that is much higher than the economic effect of any lost jobs. For example, a 2012 study by Gary Hufbauer and Sean Lowery concluded that then-President Barack Obama’s tariffs on tire imports from China saved, at most, 1,200 jobs, at a cost to consumers of around $1.1 billion in 2011, or about $900,000 per saved job.

President Trump is making the same mistake by imposing steep tariffs on Chinese solar panels and South Korean washers and dryers, and steel and aluminum imports. These actions may create or save a few U.S. jobs, but will be very expensive for consumers who will have to pay more for their appliances and other products that use steel or aluminum.

The president has said that our trade pact with Mexico and Canada — the North American Free Trade Agreement — “is the worst trade deal ever.” He says something similar about every relationship that produces a deficit in the official goods and services accounts, because he mistakenly believes that deficits reflect a loss to the U.S. economy.

But the president is missing a critical part of the bigger picture. If we buy more goods than we sell, the extra dollars that go abroad, the deficit dollars, don’t get stuffed under a mattress. They come back in the form of capital investments in securities, land, buildings and other things that don’t show up in the goods and services accounts but that are just as important to the U.S. economy as the purchase of products that are included in those accounts. If you combine the capital inflows with the goods and services accounts, everything balances and the dreaded deficits disappear, along with the need for the reciprocity that the president insists upon.

The president thinks that trade is a fixed-size economic pie and that surpluses and deficits define winners and losers. But the actual effects of trade are to make the whole pie and all the pieces bigger and to raise the standard of living for all the participants. Because of the differences in the sizes of the countries, most economists believe that the effect of NAFTA on the U.S. economy has been small but positive, adding several billion dollars a year to our gross domestic product. The agreement, which was signed in 1993, could use an update, but it would be a mistake to abandon it because of confusion about how trade accounting works.

President Trump’s blind spot on trade won’t derail the U.S. economy, but a trade war with one or more of our important partners would reduce our exports, harm consumers and slow the growth the administration wants to take credit for. Understanding some simple facts about trade could prevent that outcome.

Martin Jones of Freeport is an economic and financial analyst who writes about public policy.