The NYPD is taking aim at 300 pistol-loving thugs responsible for most of New York’s gun violence, using shooting data to tie them to murders and weapon crimes.

In a city of more than 8 million people, these few hundred are the targets of a new crime-fighting strategy because they fired a gun, or were shot themselves, three or more times since 2010.

Three shootings on either side of a gun puts you on the list. Call it “broken people” ­policing.

The 300 club, composed of street-toughened gang members and drug dealers, has been culled from the larger, so-called “multi-hit list” — 1,200 individuals linked to more than one shooting.

Cops have been compiling the list for two years.

The 300 account for a “disproportionate” number of shootouts in New York, said Dermot Shea, the NYPD’s deputy commissioner of operations whose office is spearheading the effort.

“These people are dangerous and very interesting to us,” Shea said. “It’s a huge city, but there’s a low number of people who create a lot of chaos.”

Last year, there were 1,172 shootings in New York, after an all-time low of 1,100 in 2013. So far this year, shootings are up 11 percent.

The program is considered a new chapter in Police Commissioner Bill Bratton’s “broken windows” approach to reducing crime.

The strategy began with reams of shooting data, which police pared to the multi-hit list and then further whittled down by eliminating older ex-cons whose crimes go back many years.

The result was 300 or so young guns ages 18 to 24 — “the testosterone age,” Shea called it.

The members of that group are said to be the baddest of the bad — and the likeliest New Yorkers to fire a weapon.

“The data has always been there. It’s how you use it that makes the difference,” Shea said.

One teen has been linked to five shootings — three in which he was arrested for having the weapon.

“He’s given me gray hairs,” said Shea, who declined to identify the youth.

Some on the list have been both perp and victim. One was shot in seven incidents yet somehow survived. Another was hit four times and is the suspected gunman in two shootings.

A police source said adding victims of multiple shootings to the list was critical to understanding the flow of violence.

“Unless you’re the most unlucky guy in the world, there’s a good chance you’re associated in some way with illegal activity,” the source said.

The stats also reveal:

More than half of all shootings in the city include a gang member

Ninety-two percent of all shooters and 90 percent of victims are men

Three out of every four incidents happens in Brooklyn or The Bronx

The number-crunching is used to focus police efforts after a shooting and prevent gunplay, Shea explained. New victims are checked against the lists and matches help detectives quickly identify suspects and emerging turf wars.

The quicker they see the potential links, the faster they can begin knocking on doors — and catching gun-toting criminals.

“Every hot beef that’s going on, this office is intimately familiar with,” Shea said.

Police are also folding in overlapping patterns of drug and gang activity, and have set up a “Fusion Center” in The Bronx where a dozen investigators keep tabs on repeat offenders and respond quickly when one of them is shot or arrested in a shooting.

“We’re . . . increasing the debriefings and doing them quickly, particularly with certain groups like the ones on this multi-hit list. And then using that information to build conspiracy cases,” said a source.

Getting there fast often leads to better, more specific information that can be turned around and used as cops probe shootings, he said.

Additional reporting by Shawn Cohen