Donald Trump currently has at least 846 delegates, according to the NBC News tally, and he can still clear the magic number of 1,237 during the primary season. Doing so would prevent the open convention that Ted Cruz and the Stop Trump movement are banking on. Here’s what it would take:

April 26

Pennsylvania (17 pledged delegates, 54 unbound): Trump leads in every poll and is on pace to win the 17 pledged delegates that will go to the statewide winner. The 54 unbound delegates will be selected in the primary and will be free to vote for whomever they want at the national convention. Even if they declare a candidate preference before the convention, they will not be formally bound to it in any way. That said, a large number of them are already committing publicly to supporting whichever candidate wins their congressional district – or at least to weighing the district result heavily in their decision. Trump may have trouble in a few districts around Philadelphia, but his wide poll lead suggests he’s on course to run up wide margins across most of the state. Practically speaking, it may be very hard for an unbound delegate who wins his or her slot by vowing to honor the results in his or her district to wiggle out of that commitment in the face of a Trump landslide. Target: 17 pledged delegates plus 36 unbound

Maryland (38 delegates): Trump leads the state by a wide margin and should easily win the 14 delegates that come with a statewide victory. The other 24 are given out by congressional district – three to the winner of each of the state’s eight districts. Polling suggests Trump may lose to John Kasich in the D.C. metro area. Target: 32 delegates

Delaware (16): It’s a winner-take-all state and Trump leads big. Target: 16

Connecticut (28): If Trump can break 50 percent statewide, he should sweep the state (provided he doesn’t finish behind Kasich in the 4th Congressional District, which includes the state’s affluent and highly educated Gold Coast). Currently, Trump is running at 48 percent statewide. Target: 28

Rhode Island (19): Demographically, this state is a perfect fit for Trump and should produce one of his largest margins. The bad news: Its system for delegate allocation is highly proportional, limiting his potential gains. Target: 10

Leaving aside the Pennsylvania unbound delegates, if Trump hits these numbers he’ll end April with at least 949 delegates. That would bring us to:

May 3

Indiana (57): It’s hard to overstate the importance of this state. This is because a very small shift in the vote could produce a major shift in delegates. This has to do with how Indiana distributes delegates: 30 to the statewide winner, plus three to the winner of each of the state’s nine congressional districts. So, for example, if Trump were to eke out a narrow statewide win while carrying six districts, he would net 48 delegates. But shave a few points off his total and give him a narrow loss and his delegate haul could be in the single digits. The potential swing here is huge, and the state’s demographics suggest it could be the closest contest left on the board. A Trump win here may be essential to clearing 1,237 cleanly. Target: 48

May 10

West Virginia (34): Based on demographics, Trump should crush it here. The catch is that the state’s absurdly complicated ballot could mean that Trump voters fail to vote for Trump delegates. Otherwise, West Virginia looks like a Trump cakewalk. Target: 30

Nebraska (36): A winner-take-all primary smack in the middle of what has been Cruz’s strongest part of the country. A Trump win here would be an upset and would suggest he’s well on his way to 1,237. But expect a Cruz victory. Target: 0

May 17

Oregon (28): All 28 delegates are awarded proportionally based on the statewide primary result. Target: 12

May 24

Washington (44): Delegates are given out proportionally at both the district and statewide levels to candidates who clear 20 percent in the primary. Target: 22

Meeting all of these targets would leave Trump with at least 1,061 delegates at the end of May. That would mean he would need a total of 176 on:

June 7

New Jersey (51): Polls and demographics say this will be an easy Trump win in a big winner-take-all state. Target: 51

Montana (27): A winner-take-all state that looks suspiciously like Cruz country. Target: 0

South Dakota (29): Same as above, this time with 29 delegates at stake. Target: 0

New Mexico (24): Delegates are given out proportionally here to all candidates breaking 15 percent. Target: 10

California (172): A mere 13 delegates go to the statewide winner here, with the real action in the state’s 53 congressional districts, where the winner of each will receive three delegates. The bad news for Trump: The Cruz team is talking up its superior organizing at the district-level, something that could be especially critical in the many heavily Democratic districts around Los Angeles and San Francisco, where few Republicans will actually vote on June 7. There’s also a poll that suggests Trump could win statewide while struggling in district-rich Los Angeles County. The good news: Trump is still leading statewide and his support tends to be more evenly distributed than Cruz’s. Plus, there’s not much evidence in this year’s results that the kind of district-based organizing Cruz is attempting will be that effective. If Trump really does win California by a high single-digit margin, he still seems likely to carry an awful lot of districts. For the purposes of this exercise, let’s say he can get two-thirds of them, or 35. Target: 118

If he makes these numbers, Trump would finish the primary season with at least 1,240 delegates – over the magic number. Obviously, this would be a perilous path with little margin for error. A loss in Indiana, for instance, would knock his final number well under 1,237. That said, a stronger win in California than we’re penciling in here could push him well past 1,237. More importantly, this does not include the unbound delegates from Pennsylvania. Again, they’ll be free to change their minds all the way up until the convention roll call, but if Trump wins Pennsylvania big it does seem likely he’ll take a large number of them.

Which brings us to a bigger point: If Trump is short of 1,237, it still might not be enough for the Stop Trump forces. As the Pennsylvania situation shows, there are potential avenues for him to add delegates even if his primary season total is a few dozen short of 1,237. Moreover, if he’s that close, there’s the very practical issue of whether the Republican Party, for all of the anti-Trump noise now in the air, will want to spend those valuable weeks leading up the Cleveland convention desperate fighting someone who is likely in the end to have the votes to become the nominee.