It turns out that Mayor de Blasio’s proposed quota system for the city’s top public high schools would wind up enrolling hundreds of kids who failed the state seventh-grade math and English tests.

In other words, his Equity and Excellence Agenda is all “equity” and zero “excellence.”

The Wall Street Journal ran the numbers on the mayor’s plan to hand out seats at Stuyvesant, Bronx Science and other demanding high schools by granting admission to the top 7 percent of students in each public middle school.

Because many of those schools enroll so few high- or even medium-achievers, some 318 kids who don’t even show basic proficiency in the eighth grade would still be awarded admission to one of the eight selective high schools. Of course, once they are in, they’d plainly be unable to compete, unless segregated in remedial class — which pretty well defeats de Blasio’s (supposed) purpose.

Meanwhile, a thousand or more students who aced the state exams — and who would get an elite-school seat under current rules — would be turned away.

A Department of Education spokesman pooh-poohed the Journal report, insisting that students in the top 7 percent “are on par with the grades and abilities of the students in the specialized high schools.” But saying it simply doesn’t make it so.

Understandably, Team de Blasio’s drive to destroy these schools’ admission standards is meeting lots of outrage, especially in Asian communities that would likely be the biggest losers. DOE staffers trying to sell the mayor’s proposal at a District 20 meeting in Sunset Park on Thursday were booed down.

De Blasio needs the Legislature’s approval to impose his 7 percent “solution.” But he’s already moving ahead with his Plan B — setting aside 20 percent of the seats for students who attend “high-poverty” middle schools and just miss the admission cut-off score. That, too, will come at the expense of high-achieving students at high-performing middle schools.

This mayor is chipping away at what makes the city’s elite high schools work. The only question now is how much damage he’ll manage to do in his final three years.