Republican presidential front-runner Donald Trump can still clinch the party’s nomination before its convention — but not if the results from the Wisconsin primary are a sign of things to come in the homestretch of the campaign.

Wisconsin also stalled the Democratic front-runner, Hillary Clinton, but underdog Sen. Bernie Sanders still needs some big victories to overtake her.

Following Tuesday’s results, Trump leads the GOP field with 743 delegates, according to The Associated Press. Sen. Ted Cruz (R-Texas), who called his 13-point victory over Trump in Wisconsin a “turning point,” is running second with 517. Ohio Gov. John Kasich, who finished a distant third on Tuesday, has 143.

Trump is the lone Republican candidate with a decent shot at securing the 1,237 delegates needed to clinch the nomination. Some accounts say he can make it if he continues the same level of voter support in upcoming primaries. But the Five Thirty Eight blog says the real estate developer is on track to fall a bit short, at around 1,182.

Cruz is mathematically alive and is hoping Wisconsin is a sign of things to come. A more obtainable goal, for now, is trying to stop Trump from winning a majority of delegates. If that happens, Cruz would have a shot at winning a contested GOP convention in Cleveland in July.

Kasich’s hopes also rely on such a scenario. If no candidate wins a majority on the first ballot at the convention, many of the delegates become free to support anyone else. Kasich was hoping for a better showing in Wisconsin, where he received about 14 percent of the vote.

Trump must win 494 (64 percent) of the 769 remaining Republican delegates at stake in the upcoming primaries to reach 1,237. Cruz would have to win 720 or 94 percent — a practical impossibility.

Get the Breaking News newsletter! Get the latest breaking news as it happens. By clicking Sign up, you agree to our privacy policy.

Despite losing Wisconsin, Clinton has a big lead over the Vermont senator, 1,748 delegates to 1,058. But a good deal of her lead isn’t built on victories in primaries, but in superdelegates (often party officials) who say they are supporting her. They account for 438 of her 690-delegate lead; “pledged” delegates won through primaries and caucuses account for 252.

Some of those superdelegates could be “in play,” however, if Sanders overtakes Clinton in pledged delegates.

Sanders has won six consecutive primaries.

Counting the superdelegates who favor her, Clinton needs to win 634 (32 percent) of the remaining 1,977 delegates at stake in upcoming primaries to win the Democratic delegation. Sanders would need 67 percent.

Counting only delegates pledged through primaries and caucuses, Sanders needs to win about 60 percent of the remaining delegates to surpass her.

All of it makes the next primary — right here in New York – even more crucial. And the delegate math trickier.

Unlike 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 congressional district.

For Republicans, 95 delegates are at stake. This includes three delegates in each of the state’s 27 congressional districts and 14 “at large” delegates.

Candidates compete in each district — if one 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 in proportion with a candidate’s statewide vote, state GOP Chairman Ed Cox said.

Democrats have 247 delegates at stake. Like Republicans, Democrats will compete congressional district by congressional district. In most districts, six delegates are up for grabs, though some have five or seven. And the math is complicated.

There are threshold percentages required to win certain numbers of delegates. 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 could receive only 42 percent of the vote in some districts, but still split the delegates with Clinton, three apiece, said Nassau County Democratic Chairman Jay Jacobs.