ALBANY — New York’s presidential primary Tuesday won’t just be about which Democrat or Republican wins the most votes. It’s about where they win them, as the candidates compete in an unusual format that has their campaigns throwing out the usual election playbook.

Unlike most other states, New York delegates aren’t doled out strictly in proportion with a candidate’s statewide vote total. Instead, it’s like 27 “mini primaries” — one for each of the state’s 27 congressional districts. And a candidate’s delegate haul in each district is based not just on winning but on hitting certain vote-percentage thresholds.

That’s why you see discreet but telling stops in each candidate’s campaign schedule in the final days leading up to Tuesday’s New York primary: Donald Trump stumping in small upstate cities such as Plattsburgh, Rome and Watertown. Ohio Gov. John Kasich hitting Utica and Troy, but also stopping at the Great Neck Synagogue and making efforts in Manhattan. Sen. Ted Cruz (R-Texas) lunching in a Bronx restaurant — not because it’s a Republican haven, but because as few as 150 votes has carried one of the Bronx’s congressional districts before.

In this contest, every picture tells a story.

“The fact that Trump is going to Plattsburgh and Watertown tells you something’s going on there,” said Bruce Gyory, a veteran New York political consultant.

The Democrats are focused on district-by-district outcomes where there are the greatest concentration of Democrats, but also are placing more emphasis on the overall statewide result than Republicans. That’s because Vermont Sen. Bernie Sanders and former Secretary of State Hillary Clinton are battling for perception as well as votes: Can Sanders win an eighth straight primary and refute the idea Clinton is inevitable? Can New York put Clinton “over the top,” ending talk of a Sanders upset?

advertisement | advertise on newsday

Toward that, Sanders of Vermont held huge rallies in the Bronx and in Greenwich Village. Clinton, too, has mostly stayed downstate.

Math plays a major role in the campaigns’ New York playbook. For Republicans, 95 delegates are at stake Tuesday. This includes three delegates in each of the state’s 27 congressional districts and 14 “at large” delegates. If a candidate receives more than 50 percent of the vote in a district, he gets all three delegates. If no one garners more than 50 percent, then the top finisher gets two and the runner-up gets one. The 14 at-large delegates will be allocated roughly in proportion with a candidate’s statewide vote.

Trump is running way ahead of the Republican field statewide. So the task for Kasich and Cruz is to “play the delegate denial game” in select districts, one veteran Republican strategist said. That’s part of an overall strategy by Cruz and Kasich to keep Trump from locking down the 1,237 delegates needed nationally to cinch the nomination and avoid a contested GOP convention.

“I don’t think Cruz or Kasich has an outstanding chance to win a lot of delegates,” the strategist said. “But they can keep him under 50 percent and deny him delegates in some areas.”

Several Republicans cited congressional districts around Albany and Central New York, as well as the North Country as areas where Trump could fail to sweep. Downstate, some believe Kasich has a chance to at least crack 25 percent in several Manhattan districts. On Long Island, they point to the districts held by Rep. Steve Israel (D-Huntington) and Rep. Kathleen Rice (D-Garden City).

“He’s working it,” Assemb. Andrew Raia (R-Huntington) said of Kasich, whom he’s endorsed.

Some projections say Trump has a shot at reaching 1,237 but needs a big win in New York — maybe 80 delegates or more. His backers confidently predict a sweep of all 95. Gyory believes 75 is a good barometer: Above that, Trump’s done well. Below, it will hurt his run at 1,237.

Democrats have 247 delegates up for vote. In most districts, six delegates are up for grabs, though some have five or seven. And the math is complicated.

If a candidate wins 41.7 percent of the vote in a district, he/she gets at least three delegates. If the candidate receives 58.4 percent or more, he/she gets four. So Sanders, who is trailing in the polls, could receive only 42 percent of the vote in some districts, but still split the delegates with Clinton, three apiece.

That means campaigns will have to be “mindful” of where to put last-minute resources, said Nassau County Democratic Chairman Jay Jacobs, a Clinton backer.

advertisement | advertise on newsday

“If you’re at a solid 46 percent in some district, to put resources into getting to 51 percent is wasteful,” he said. “But if you are at 56, and you can put some effort into it and get to 59, then you’ve picked up four delegates.”

Sanders could be expected to do well in areas that Zephyr Teachout, an insurgent who ran in a Democratic primary against Gov. Andrew Cuomo in 2014, fared well, said Rep. Hakeem Jeffries (D-Brooklyn), a Clinton supporter. He suggested the Capitol Region, Hudson Valley and areas with significant numbers of environmental activists.

“It’s safe to say all the people who voted for Zephyr are all in for Bernie Sanders,” said Bill Lipton, director of the labor-backed Working Families Party, which is supporting Sanders.

On Long Island, some Democrats have said they’d expect Sanders to have his best shot in eastern Suffolk County because of its active progressive community and the presence of Stony Brook University.

Clinton must run ahead of Sanders downstate and battle him evenly upstate, Gyory said.

advertisement | advertise on newsday

“Upstate will be a Democratic battleground,” Gyory said. “You have a lot of university towns and research centers, surrounded by Rust Belt economies — areas where Sanders has typically done well. But Clinton has built strong relationships with these communities during her time as senator. If she splits upstate, that will be very good for her.”

Jeffries said Clinton will “need to do well” on the Island as well as six New York City-based congressional districts currently held by African-Americans or Latinos. “If we see those communities are breaking for Secretary Clinton,” Jeffries said, “then we know it will be a good night for her.”