The impact on everyone else, though, is surprisingly positive. Giovanni Peri, an economist at the University of California, Davis, has written a series of influential papers comparing the labor markets in states with high immigration levels to those with low ones. He concluded that undocumented workers do not compete with skilled laborers — instead, they complement them. Economies, as Adam Smith argued in “Wealth of Nations,” work best when workers become specialized and divide up tasks among themselves. Pedro Chan’s ability to take care of routine tasks on a work site allows carpenters and electricians to focus on what they do best. In states with more undocumented immigrants, Peri said, skilled workers made more money and worked more hours; the economy’s productivity grew. From 1990 to 2007, undocumented workers increased legal workers’ pay in complementary jobs by up to 10 percent.

I saw this in action when Chan took me to his current work site, a two-story office building on Coney Island Avenue. The skilled workers had already installed wood flooring in a lawyer’s office and were off to the next job site. That left Chan to clean up the debris and to install a new toilet. As I looked around, I could see how we were on one end of an economic chain reaction. Chan’s boss no longer had to pay a highly skilled worker to perform basic tasks. That lowered the overall cost of construction, increasing the number of jobs the company could book, which meant more customers and more money. It reminded me of how so many restaurants operate. Without undocumented labor performing routine tasks, meals, which factor labor costs into the price, would be more expensive. There would also be fewer jobs for waiters and chefs.

Earlier that day, I was reminded of another seldom-discussed fact about immigrant life in the United States. Immigrants spend most of the money they make. Chan had broken down his monthly expenses: $400 a month in rent, another $30 or so for gas, electric and Internet. He sends some money home and tries to save a few thousand a year in his Citibank account, but he ends up spending more than $10,000 annually. That includes the $1,400 or so he pays the I.R.S. so that he can have a taxpayer I.D. number, which allows him to have a credit score so that he can rent an apartment or lease a car.

There are many ways to debate immigration, but when it comes to economics, there isn’t much of a debate at all. Nearly all economists, of all political persuasions, agree that immigrants — those here legally or not — benefit the overall economy. “That is not controversial,” Heidi Shierholz, an economist at the Economic Policy Institute, told me. Shierholz also said that “there is a consensus that, on average, the incomes of families in this country are increased by a small, but clearly positive amount, because of immigration.”

The benefit multiplies over the long haul. As the baby boomers retire, the post-boom generation’s burden to finance their retirement is greatly alleviated by undocumented immigrants. Stephen Goss, chief actuary for the Social Security Administration, told me that undocumented workers contribute about $15 billion a year to Social Security through payroll taxes. They only take out $1 billion (very few undocumented workers are eligible to receive benefits). Over the years, undocumented workers have contributed up to $300 billion, or nearly 10 percent, of the $2.7 trillion Social Security Trust Fund.