Visitors look at a humanoid robot at the 2017 China International Robot Show this month in Shanghai. (Aly Song/Reuters)

Don’t worry. The robots won’t destroy all our jobs. History suggests just the opposite — that new technologies inspire new jobs. So concludes a study from leading labor economists. It’s a useful antidote to widespread fears that robots and “artificial intelligence” will displace millions of workers and lead to permanently high joblessness.

No doubt, the anxiety is real. Despite a low unemployment rate, 4.4 percent in June, roughly a quarter of Americans (26 percent) think their present job will be eliminated by new technologies within the next two decades, according to a recent Gallup poll. Half those jobs supposedly would vanish within five years. The Gallup report mentioned truck drivers (vulnerable to self-driving trucks), taxi drivers (already threatened by Uber) and surgeons (facing robotic operating machines).

The new study doesn’t deny that jobs will be lost. But that’s not the end of the story, say David Autor, a well-known labor economist at the Massachusetts Institute of Technology, and his collaborator, Anna Salomons of the Utrecht University School of Economics. Jobs have been lost before to new technologies, but these same technologies also create productivity increases — efficiency gains — that usually generate more jobs than were initially lost.

Although that has long been accepted economic theory, the study’s contribution is to confirm that the theory works in practice. Autor and Salomons focused on 19 advanced nations — the five largest were the United States, Japan, Germany, France and the United Kingdom — over the period from 1970 to 2007. Generally, employment declines initially triggered by productivity gains were later offset by larger job increases.

A simple example shows why the theory works. Consider (hypothetically) widgets. Assume that new technologies cut widget production costs by 20 percent. These savings must go somewhere, and the chances are that they will be spent, thereby creating new jobs. The major candidates to receive the windfall are: a) consumers, who could benefit from lower widget prices; b) widget workers, whose salaries might be boosted; or c) the shareholders of widget makers, which might raise dividends or build factories.

This logic could be thwarted if the windfall were saved and not spent. Autor and Salomons checked that possibility and found it untrue. Across all countries — there were obviously differences among nations — the study found that every 10 percent gain in productivity resulted in a 2 percent gain in employment spread over four years. This was an important contribution to job growth, though the largest employment gain came from old-fashioned population increases.

The main takeaway is this: Trying to save jobs by protecting old jobs from new technologies and other productivity-enhancing changes is self-defeating; employment may benefit temporarily, but the diffuse process of creating jobs and raising living standards will be frustrated. (We leave aside the trickier issue of whether all new technologies are socially useful. Do video games contribute to our national well-being?)

All this good news comes with a few sobering caveats. One is the fate of manufacturing. In all the major countries, its productivity has grown the fastest, leading — somewhat paradoxically — to a shrinking share of total employment. Although it makes little economic sense to try to reverse this, the political temptation to do so is considerable. What’s occurring, say Autor and Salomons, is a historic shift to a more service economy.

That raises another caveat. Jobs in the service sector are polarized between the high-productivity, well-paid positions and the low-productivity, poorly paid positions. “The primary societal challenge posed so far by these advances” is not total employment but its “skewed distribution” with too many low-skilled workers, write Autor and Salomons.

In an ideal world, the robots would do most of the repetitive and monotonous work, while a better-educated and better-paid workforce would concentrate on jobs that can’t be outsourced to machines. We may not know precisely what those jobs will be, but we can be reasonably confident that — as long as we don’t discourage job creation though bad economic policies — the American labor market isn’t a doomsday machine that no longer can reach full employment.

Read more from Robert Samuelson’s archive.