Donald Trump not only beat Marco Rubio last night, he beat the expectations game as well. He crushed Rubio by almost 20 points in the Floridian’s home state. He took Illinois by 10 points over Ted Cruz and 20 points over John Kasich, and in Missouri, he edged out Cruz by the narrowest of margins.

Trump also extended his dominance of Cruz in the South, beating him in the final race in the region that was to be Cruz’s launching pad to the nomination. The New Yorker won 11 of the region’s 12 contests, losing only in the Texan’s home state. Last night, Trump even carried the Northern Mariana Islands, which was supposed to go to Cruz who invested early in the territory.

But Trump lost to Kasich in Ohio, not a surprise after Rubio began his fade-to-black two weeks ago. Kasich has no shot at winning the nomination. In fact, it’s difficult to find any state he’d be favored to win. But he’s promising to remain in the race through to the end.

If Kasich keeps that promise, he can play the role of spoiler—but spoil what for whom? Calculating how the GOP’s delegate allocation rules will shape the race from here is extremely complicated in a three-man race. In some states, Kasich might reduce Trump’s delegate hauls and slow his pace to the nomination. In others he might prevent Cruz from reaching high delegate allocation thresholds, playing the spoiler for Cruz’s chances of catching up to Trump. And in other states, most notably California, Kasich could split the anti-Trump vote with Cruz and deliver the state to Trump. Winning California could hand the New Yorker the nomination.

Three Questions

Trump enters the next phase of the nomination battle having won 661 delegates, or 48 percent of all bound delegates awarded so far, and he has a 255 delegate lead over Cruz, his only remaining viable competitor. (Delegate counts are preliminary pending final allocations in Illinois and Missouri.) These figures raise three questions:

Can Trump secure 1,237 delegates and wrap up the nomination before the convention opens on July 18?

If Trump fails to secure a majority, can he come close enough that the GOP establishment dare not deny him the nomination by manipulating the rules against him?

If Trump fails to win a majority, can Cruz overtake him and win a plurality before the convention?

To explore these questions, we’ll make some necessarily rough judgments about how the remaining states and territories are likely to allocate their delegates among the candidates. We’ll start by analyzing the states according to the five ways they allocate delegates: proportional with low or no thresholds; proportional with high thresholds; mixed winner take all, winner take all, and mixed bag.

Projecting the Delegate Winnings

Proportional states with low or no thresholds

Rhode Island

Oregon

In Rhode Island, Trump led Cruz in a late-February poll by a margin of four-to-one, and the New York billionaire has dominated the New England primaries so far. We’ll give him 12 of the state’s bound delegates, and four to split between Cruz and Kasich.

No polls are available from Oregon, but since the state is strictly proportional and only 25 bound delegates are at stake, no candidate is likely to win a significant delegate margin in the state.

Proportional states with high thresholds

Utah (15 percent)

New York (20 percent)

Washington (20 percent)

New Mexico (15 percent)

A three-man race complicates the calculations in these states. With Rubio out of the picture, Cruz’s best opportunity might be in the Utah caucuses, if the party rallies to the Texan in a stop-Trump effort. But if Trump meets the state’s 15 percent threshold, he’ll deny Cruz a portion of Utah’s 40 delegates. We’ll assume he does and that Cruz beats him by a four-to-one margin and takes 32 delegates to Trump’s eight, for a margin of 24 delegates.

We have no polling information from Washington. In New Mexico, Trump and Cruz were tied in a mid-February poll. We’ll leave these states unassigned.

In New York, Trump led Cruz in an early-March poll by a margin of four-to-one. Worse news for Cruz: he was nine points below the state’s 20 percent threshold. Rubio and Kasich were tied at 18 percent. Cruz’s best case scenario is that he, Trump, and Kasich split the delegates, with all three making the threshold. This could work out roughly to a 50/25/25 percent split of the state’s 92 bound delegates, with the larger share going to the New Yorker. This would give Trump a net margin over Cruz of +24 delegate.

Another scenario: If Kasich surges and consolidates enough of the anti-Trump vote to keep Cruz below the 20 percent threshold, he’d deny the Texan any delegates. If Trump took about 52 percent of the vote and Kasich took about 32 percent, the New Yorker would receive a net margin over Cruz of about +60 delegates.

If the race comes down to a faceoff between Trump and Cruz, the New Yorker could beat Cruz by a margin of two- or three-to-one. This would give Trump a margin of +31 to +46 delegates. So, under these three scenarios, the range of delegate margins for Trump is +24 to +60.

Mixed winner-take-all states

Wisconsin

Connecticut

Pennsylvania

Indiana

California

Wisconsin, Indiana, and California are winner-take-all at the statewide level, and winner-take-all for delegates at the congressional district level. The California primary is almost three months away and the latest polls are more than two months old. In an early-February poll in Pennsylvania, Trump led Cruz by a two-to-one margin, but 57 of the state’s 71 delegates are unbound. No polls are available from Wisconsin and Indiana. We’ll leave all four states unassigned.

Connecticut allocates delegates winner-take-all to any candidate who receives a majority of the vote. If no candidate receives a majority, delegates are allocated proportionally with a 20 percent threshold, statewide, and winner-take-all by congressional district. Trump has beaten Cruz by margins of three- to five-to-one in the three primaries held so far in New England. In a two-man race, he can be expected to take all 25 delegates at stake in the Connecticut. In a three-man race, he might still achieve a majority, or he could keep Cruz below the 20 percent threshold and deny him delegates. We’ll assign Trump all of the state’s 25 bound delegates.

Winner-take-all states

Arizona

Delaware

Maryland

Nebraska

Montana

New Jersey

South Dakota

No polls have been conducted in Arizona since early November, but Trump’s hardline immigration message is likely to play well in the state. He’s been endorsed by former Gov. Jan Brewer and Maricopa County Sheriff Joe Arpaio, himself a hardliner on illegal immigration. The primary is next Tuesday, and Trump will have momentum coming out of last night’s victories. We’ll assign the state’s 58 delegates to the New Yorker.

An early-March poll in Maryland had Trump over Cruz by nine points. No polls are available from Delaware. Surrounding states have been Trump territory. He beat Cruz by a margin of two-to-one in Virginia. In two February polls, the New York billionaire led Cruz by a margin of two-to-one in Pennsylvania and almost four-to-one in New Jersey. Maryland and Delaware have a combined total of 54 delegates. We’ll assign all of the states’ delegates to Trump. New Jersey also looks like Trump country. A mid-February poll had Trump leading Cruz 38 percent to 10 percent, so we’ll assign the state’s 51 delegates to the New Yorker.

No polls are available from Nebraska, Montana, and South Dakota, but Cruz has performed well in the Great Plains and northern Rocky Mountain states, so we’ll assign the three states’ 89 bound delegates to the Texan.

States with other allocation schemes

Colorado

West Virginia

American Samoa

Colorado has already started a process of choosing delegates through district and state conventions. The state’s 37 delegates are officially unbound and their candidate preferences are not known at this time. However, Cruz’s ground operations probably give him an advantage here, and the mountain west looks like good terrain for him. We’ll assign Cruz the delegates two-thirds to the Texan, one-third to Trump, giving Cruz a net margin of +13 delegates.

Trump led Cruz by a margin of two-to-one in West Virginia in a poll conducted in mid-February. Surrounding states have been strong for Trump, so we’ll assign the state’s 31 bound delegates to Trump. American Samoa elects and binds its delegates at a party convention on Saturday. We’ll leave the territory unassigned.

Can Trump get to 1,237?

So, returning to question #1: Does Trump have a reasonable shot at securing 1,237 delegates by the end of the primaries on June 7?

The short answer is “yes”.

In the preceding analysis, we’ve assigned to Trump a total of about 310 delegates from Rhode Island, Utah, New York, Connecticut, Arizona, Maryland, Delaware, New Jersey, Colorado, and West Virginia. Added to the 661 delegates he was won so far, this leaves him roughly 266 delegates shy of a majority. Winning California’s 169 bound delegates would leave him only 97 delegates short.

Trump could pick up those delegates from two sources. One is the states that were not assigned to a candidate in the preceding analysis, including proportional states in Oregon, Washington, and New Mexico, and winner take all states in Wisconsin, Pennsylvania, and Indiana.

A second source is the batches of unbound delegates in three states and the 96 unbound delegates that are scattered across 30 states and territories, typically, three per state. There are 57 unbound delegates in Pennsylvania, 29 in Wyoming, 28 in North Dakota, and 96 spread over 30 other states.

Trump has many routes to a majority by combining bound delegates that he wins with unbound delegates he persuades to support him. A total of 428 delegates are available in these states. The billionaire would need about 97 of these delegates to claim a majority—if he wins California. If he fails to carry California, he’ll need to take roughly 266 of these 428 delegates to secure a majority before going to the convention. That’s a tall order.

But can he get close enough?

If Trump fails to win a majority of delegates before the convention opens, he’s likely to be close. For example, if he reaches 1,112 delegates, he’ll have a plurality of 45 percent, and Cruz would be well back, below 40 percent. The party would probably be shattered if party elites attempted to deny the nomination to a candidate who had won a strong plurality of the delegates, a majority of states, and a majority of the votes cast in the states.

Moreover, an attempt to jigger the rules to stop Trump might end up sealing the nomination for him. Such an anti-democratic act by GOP leaders could cause a revolt among unbound delegates and delegates who favor other candidates, especially Cruz delegates, sending them into the Trump camp. If Cruz has a political future, he cannot be seen to acquiesce or cooperate in a maneuver that his supporters would view as the ultimate confirmation of the perfidy of GOP leaders.

Machinations of this sort are not a remote possibility. Party leaders are already to support an interpretation of convention rules that would unbind all delegates, even on the first ballot.

Could Cruz win a plurality?

What would it take for Cruz to overtake Trump and carry a plurality of delegates into the convention? He is currently trailing Trump by about 255 delegates. The preceding analysis provided some guesstimates of how Trump and Cruz might fare in upcoming contests. I project Trump emerges from Rhode Island, New York, New Jersey, Connecticut, Arizona, Maryland, and Delaware with a net margin of 200 to 256 delegates, and Cruz gets a net margin of 126 delegates from winning in Utah, Nebraska, Montana, South Dakota, and Colorado.

The net effect of these 12 contests is to pad Trump’s lead over Cruz by between 94 and 130 delegates. We’ll split the difference at 110 delegates, add them to Trump’s current lead of roughly 255 delegates, and call Trump’s projected lead to be about 365 delegates. Where can Cruz pick up 365 delegates?

First, he must win California’s 169 bound delegates. If he does, he needs another 196 from the unassigned states and states with unbound delegates listed above. Only the winner-take-all states offer an opportunity for Cruz to take meaningful delegate margins over Trump. These states—Wisconsin, Pennsylvania, and Indiana—combined, have 119 bound delegates at stake. If Cruz were to sweep all four, as well as win California, he’d still be 77 delegates short of catching Trump.

Another 210 unbound delegates are available to Cruz, but Trump, and perhaps Kasich, will be competing for these delegates, too. To close the remaining gap of 77 delegates, Cruz would have to beat Trump by a margin of more two-to-one in the battle for unbound delegates.

So it’s theoretically possible for Cruz to catch Trump. But the largest state Cruz has won to-date, excepting his home state, is Oklahoma. Four of his seven victories have come in small caucus states, and more than one-quarter of his delegate total comes from his victory in Texas. Considering that record, his chances seem slim to sweep California, Pennsylvania, Wisconsin, Indiana, Nebraska, Montana, and South Dakota, and secure support from 60 percent of all unbound delegates.

Philip Diehl is a former chief of staff of the U.S. Treasury Department, staff director of the Senate Finance Committee, and director of the U.S. Mint.