Of all the unforced errors Hillary Clinton’s made so far, calling half of Trump supporters “a basket of deplorables” is possibly her most misguided.

Aside from falling prey to juvenile name-calling, Clinton presumes that this swath of the electorate uniformly holds, and is animated by, racist views.

Perhaps her husband needs to remind her of his campaign slogan in 1992: It’s the economy, stupid.

Last Tuesday, four days after Clinton made that remark — at a star-studded gala in Manhattan, where Barbra Streisand performed — the Census Bureau released new data about jobs and the economy.

It was bad, bad news, energetically spun as good by many mainstream-media outlets.

“Incomes Are Up Sharply; Poor Gain Most,” said The New York Times, adding “the middle class and poor had a great year in 2015.”

“The Middle Class Gets a Big Raise. . . Finally!” said CNNMoney.

According to the Census Bureau, US households gained 5.2 percent in income in 2015 — the largest increase since the bureau began reporting such data in 1967.

That percentage sounds impressive, until you realize what it means in dollars and cents: an extra $2,798 in household income that year.

Buried further down in many of these breathless reports: This sudden soar in middle-class incomes is actually 1.6 percent less than in 2007, the last year before the economy collapsed.

The richest 5 percent of the country continue to flourish, with a 21.8 percent jump in income. The top 5 percent reported over $350,000 in earnings — up 4.9 percent from 1999 and nearly 40 percent more than 1989.

Meanwhile, the poorest Americans — 14.8 percent of the total population, or 46.7 million — are even poorer than they were in 1989.

The highest household incomes were reported in Maryland and Washington, DC — at an average of $75,000 — while Mississippi reported the lowest, at $40,539. Mississippi’s incomes haven’t budged since 2014.

Is it any wonder that average Americans — and to be average is to be struggling — feel career politicians in Washington, DC, don’t care about them?

“ ‘Basket of deplorables’ is incredibly reductionist,” says J.D. Vance, author of the bestselling memoir “Hillbilly Elegy.”

“Like a lot of people on the left, Hillary seems to want to put the Trump phenomenon on racial anxiety,” he says. (Vance, who grew up working class in the Rust Belt and Appalachia, identifies as a conservative Republican and is unsure how he’ll vote in November.) “It’s a really oversimplified way to address the concerns of millions of people who feel invisible to elites.”

These people, as Vance well knows, worry that their jobs are disappearing, never to return. They worry that as the rich get richer, they’ll be relegated to a hidden, permanent underclass that no politician, president or government agency will want to acknowledge.

And they’re right.

Despite his own problematic and incendiary rhetoric, Trump has expertly hit the marrow of the white working class: the anxiety, the dread, the suspicion that they are being lied to and left behind.

“Don’t believe those phony numbers when you hear 4.9 and 5 percent unemployment,” Trump said after winning the New Hampshire primary in February. “The number’s probably 28, 29 . . . in fact, I even heard recently 42 percent.”

Even The New York Times admitted Trump was right: If we count the unemployed, underemployed and those who have simply given up looking for work — which the Bureau of Labor Statistics does not — 40.4 percent of Americans were unemployed as of January 2016.

“They’re worried that their future won’t be better, and their kids will do worse,” Vance says. “That’s the big economic fear that drives people. When a group asserts themselves politically” — as the uneducated white working class has — “people pay attention.”

Among this group, Trump has consistently led Clinton by 58 percent-39 percent through 2016. These voters composed 44% of the electorate in 2012, and more than 70 percent of them say they’re going to vote for the Republican candidate.

Whether everything Trump says is factually correct or is irrelevant to this group. He’s speaking to the plight of joblessness, the effects of free trade and globalization, the death of unions — the tragedies that so viscerally, brutally affect these voters and their families, ones that Washington continues to spin as not so bad. Or, this week, super-fantastic news.

“The longer picture’s pretty grim,” says Ryan Avent, senior editor at The Economist and author of the new book “The Wealth of Humans: Work, Power and Status in the Twenty-First Century.” “It’s not a case of, ‘Stuff we’ve tried in the past is going to work.’ Technology and globalization have changed the world that workers are facing . . . Is this whole segment of the population going to go off in this direction and become isolated?”

A spate of recent books warn of this very likelihood: In addition to Vance’s and Avent’s, Nancy Isenberg’s “White Trash: The 400-Year Untold History of Class in America” and Nicholas Eberstadt’s “Men Without Work: America’s Invisible Crisis” also explore this specific crisis.

None have the answer.

“It’s astonishing to me that this 7-million man army of prime-age guys has been allowed to be invisible,” Eberstadt says. “I don’t think decision-makers, pundits, prognosticators or people in power know anyone in the bottom half. They don’t really know what’s going on in their lives.”

’76 million Americans say they are barely surviving financially’ - Federal Reserve Bank survey

So how is it that a billionaire businessman from New York City has connected so deeply with the geographically isolated white working class?

“He flouts the norms of Washington and New York — he says, ‘Conventional wisdom is bulls–t and we’re not gonna play by those rules anymore,’” says Avent. “For a lot of people who’ve been treading water for 15, 20 years — that Trump’s willing to address their concerns is a positive.”

Vance agrees, and points to the media’s misreading of Trump’s “I love the uneducated” comment as a prime example.

Pundits and plutocrats, he says, interpreted that statement as condescending — stupid in and of itself.

The uneducated, Vance says, felt like a presidential candidate finally saw them. Not since Robert F. Kennedy, who famously traveled to Appalachia in 1968 to shine a light on America’s poor, has a presidential candidate overtly addressed this shadow electorate.

“These people have felt very ignored by the political process for a long time,” Vance says. “They think people don’t care about them. Trump’s identified all these members of the white working class. The sense I get from people back home isn’t that they think he’s going to fix [the economy]. They’re just so relieved someone is speaking to them. The coal miner, the construction worker — they love him.”

The coal miner and the construction worker: These are just two of the many, many jobs vanishing over decades. September’s Bureau of Labor report clocked 4,000 jobs lost in mining and logging and 6,000 in construction in a one-month period.

ABC News reported 15,000 construction jobs lost in May 2016 alone.

Manufacturing jobs have been on the decline since 1979, with over 7 million lost in that sector to date. So when Trump issues broad statements on trade — “Our country is getting ripped off,” “We can’t continue to allow China to rape our country” — it’s no surprise that a huge part of the electorate feels someone is simply and plainly standing up for them.

Trump, of course, has been widely corrected on his many vague and often incorrect pronouncements, but it’s worth noting — as with his estimate of a 40 percent unemployment rate — that he occasionally hits the mark. And when he does, it’s with the uneducated white worker. Writing in Bloomberg View back in January, Megan McArdle cited economists Tyler Cowen, David Autor, David Dorn and Gordon Hanson on the disastrous effects of opening our markets to China.

“It’s been obvious for a while that China has played some role (though not the biggest) in the decline of labor-market opportunities for workers without a college diploma,” McArdle wrote. “But the authors suggest that the effect is both bigger, and longer lasting, than I would have predicted. Nor has much seemed to help the adjustment: Workers are less mobile than expected, domestic American industries less able to absorb the surplus, particularly among the lower-skilled workers whose human capital was job- and industry-specific.”

As our global economy continues to hurtle towards an automated world, what seemingly recession-proof jobs will disappear? Much has been made of our continued ability to adjust, with the “gig” economy — a far too cutesy name for a depressing, onerous reality — cited as a prime example.

The underemployed, we’re told, can supplement their incomes as Uber drivers — until one day in the near future, when Uber goes driverless. (The company has been test-driving automated cars in Pittsburgh.)

Delivery people will be replaced by drones; accountants, salespeople, brokers, telemarketers, referees, fast-food workers, bartenders, chefs, housekeepers and surgeons by software and artificial intelligence.

In March, the White House reported that someone making less than $20 an hour has an 83 percent chance of losing their job to automation. Even the world’s oldest profession isn’t safe: Humans will be having sex with robots by 2050, according to recent projections.