The NYPD is able to claim that crime is down in the subways because it only focuses on stats tied to serious felonies — which ignores thousands of offenses including random assaults that are more likely to confront long-suffering straphangers, a Post analysis has found.

Contrary to recent pronouncements by outgoing Police Commissioner James O’Neill, total crime underground has risen to its highest level in the past five years, driven by a staggering 23-percent surge in misdemeanor complaints, according to the analysis of official NYPD data.

Statistics show that a total 3,493 incidents were reported to cops between Jan. 1 and Sept. 30, compared to just 3,385 during all of 2015, the earliest year for which such data is publicly available.

In addition, total crime during the first three quarters of this year was up 10.9 percent compared to the same time period in 2018, 11.8 percent over 2017 and 21.7 percent over 2016, the figures show.

Minor crimes on the rise this year over last include:

• Misdemeanor assault, up 15.9 percent to 1,132 incidents

• Harassment, up 17.9 percent to 928

• Groping, up 10.6 percent to 450

Brooklyn resident Cody Smyth, 41, said he was the victim of a homeless teen who repeatedly demanded of G-train riders, “I’m 17, $1,” before sucker-punching him on the side of the head when the doors opened at the Bedford-Nostrand Avenues station last month.

“Having fewer homicides is great, but subway crime and assaults feel like an hourly event,” said Smyth, a photographer from Midwood. “I’ve been riding the subways my entire life, and it doesn’t seem like it was this bad, even in the ‘80s.”

Brooklyn resident Karen Kaminski — who lives in Greenpoint’s 94th Precinct, where subway crime has more than doubled since last year — noted that “it’s the smaller crimes that have a much bigger impact on the overall quality of life.”

“I’ve thankfully never been mugged, but I’ve seen it, and it’s a terrible thing to witness,” said Kaminski, a 45-year-old, stay-at-home mom.

“Two months ago I saw someone walk up to a total stranger and just punch her in the head and move on. There were no police and no one stopped him.”

Transport Workers Union Local 100 President Tony Utano said The Post’s reporting “confirms what our members have been experiencing,” adding, “Assaults against transit workers are up about 40 percent.”

The numbers uncovered by The Post boost the case for Gov. Andrew Cuomo’s plan to flood the subways with 500 new MTA cops — as well as the arguments of lawmakers who want to ban the persistent petty criminals who turn the daily commutes of countless New Yorkers into a hell on wheels.

One of the most infamous pests is Isaiah Thompson, whose alleged misdeeds include causing more than 700 delays by pulling emergency-brake cords and exposing himself before he was busted for viciously shoving a woman face-first into an idling subway car in Brooklyn.

O’Neill, who’s stepping down later this month for a job with credit-card giant Visa, blasted Cuomo last month for flagging “a dramatic increase in crime in the subway system,” which O’Neill called a “total mischaracterization.”

But retired NYPD Capt. John Eterno, a co-author of the 2014 report “Police Manipulations of Crime Reporting: Insiders’ Revelations,” said the NYPD was “eminently aware” it was glossing over a preponderance of minor crimes to play up a reduction in the seven “major” crimes of murder, assault, rape, robbery, felony assault, burglary, grand larceny and auto theft.

“It’s bulls–t,” said Eterno, now director of graduate studies in criminal justice at Molloy College.

“This hits at the heart of [Mayor Bill de Blasio’s] message of … crime being down with his policies.”

An MTA spokesman said that “the NYPD’s numbers reflect the continued need to protect our employees and millions of customers.”

“We take these misdemeanor reports extremely seriously — with nearly one in every two reports closing with an arrest — and we’ve continuously called for a ban on recidivist sex offenders,” NYPD Transit Chief Edward Delatorre said, referring to subway sex crimes, which he says are up, in part, because more riders are reporting them.

Delatorre said The NYPD “relentlessly” tracks, analyzes and investigates all subway crime.

“Major felony crime in transit is down across the city as we have drastically reduced overall arrests while increasing our arrests for violent crime,” he said.

Additional reporting by David Meyer