In an electoral process as indirect as the selection of presidential nominees, any choice made upstream in how to design the rules can have big and often unforeseen effects on the results. That’s what the GOP has learned this year: As Nate Silver found, Trump would be facing a much tougher road if Republicans were using the Democratic Party’s delegate-allocation rules.

But how have the choices made by the Democratic Party affected their presidential race? In all states, Democrats allocate a given state’s pledged delegates through a system that requires conducting multiple proportional calculations at different jurisdictional levels; it also requires the states holding caucuses to hold multiple stages of voting. Are the party’s delegate rules destiny? How much do they distort the share of the raw vote that the candidates have received, and what would Hillary Clinton and Bernie Sanders’s standing be if the Democratic National Committee had decided to allocate delegates differently, for instance through a simpler proportional calculation or through less proportional methods like the ones Republicans use?

To answer these questions, I calculated what the Democrats’ pledged delegate count would look like if their primaries were re-run under two alternative scenarios.

Scenario 1: Republican delegate rules. Democrats everywhere use a similar allocation method, but the GOP’s allocation rules vary greatly from state to state. What if Democrats in each state distributed their delegates according to that state’s Republican rules? What if all Florida delegates went to the statewide winner, North Carolina’s were allocated proportionally based on statewide results, Missouri’s were winner-take-all both statewide and by district, and so on?

Scenario 2: Statewide proportionality. For this scenario, I look at what the Clinton-Sanders count would look like if Democrats eliminated the complex multilevel and multistage system they use in all states: What if every state allocated all of its delegates in a single and straightforward proportional calculation based on the results of the statewide vote?

Let’s get to it: Below are my calculations of the Clinton-Sanders count under each alternative scenario.

CLINTON DELEGATES SANDERS DELEGATES DATE CONTEST CURRENT GOP RULES* PROP. CURRENT GOP RULES* PROP. 2/1 Iowa 23 22 22 21 22 22 2/9 N.H. 9 9 9 15 15 15 2/20 Nev. 18 18 18 17 17 17 2/27 S.C. 39 53 39 14 0 14 3/1 Ala. 44 53 43 9 0 10 Am. Samoa 4 — 4 2 — 2 Ark. 22 31 22 10 1 10 Colo. 25 25 27 41 41 39 Ga. 73 102 73 29 0 29 Mass. 46 46 46 45 45 45 Minn. 31 30 29 46 47 48 Okla. 17 5 17 21 33 21 Tenn. 44 46 45 23 21 22 Texas 147 214 147 75 8 75 Vt. 0 0 0 16 16 16 Va. 62 61 61 33 34 34 3/5 Kan. 10 7 11 23 26 22 La. 37 37 38 14 13 13 Neb. 10 0 11 15 25 14 3/6 Maine 9 0 9 16 25 16 3/8 Mich. 63 0 64 67 130 66 Miss. 31 33 30 5 3 6 3/12 N. Marianas 4 6 4 2 0 2 3/15 Fla. 141 214 141 73 0 73 Ill. 79 101 79 77 55 77 Mo. 36 41 36 35 30 35 N.C. 60 58 61 47 44 46 Ohio 81 143 81 62 0 62 3/21 Dems Abroad 4 4 4 9 9 9 3/22 Ariz. 42 75 43 33 0 32 Idaho 5 0 5 18 23 18 Utah 6 0 7 27 33 26 3/26 Wash. 27 14 27 74 87 74 Alaska 3 3 3 13 13 13 Hawaii 8 5 7 17 20 18 4/5 Wisc. 38 5 37 48 81 49 4/9 Wyo. 7 7 6 7 7 8 4/19 N.Y. 139 217 143 108 30 104 4/26 Conn. 28 45 29 27 10 26 Del. 12 21 13 9 0 8 Md. 61 95 62 34 0 33 Penn. 106 99 106 83 0 83 R.I. 11 10 11 13 14 13 Total 1,662 1,955 1,670 1,373 978 1,365 What if you re-ran the Democratic primary with different rules? *In addition to the listed delegates, following GOP rules would result in 102 unbound delegates

Current scenario: Caucus states’ lower turnout

Under current Democratic rules, Clinton has 1,662 pledged delegates and Sanders has 1,373; that’s a lead of 289 delegates.

This means that Sanders has won a larger share of the pledged delegates (45.2 percent) than of the popular Democratic vote (42.3 percent). David Wasserman recently explained that this gap exists partly because some of Sanders’s best states have used caucuses instead of primaries, and turnout is lower in caucuses, where it’s harder to vote.

GOP rules: Big bonuses to the winner

Clinton’s 289-delegate lead becomes a massive 977-delegate lead if we re-run the Democratic primaries using Republican rules. That’s a jump from a lead of 10 percentage points to a lead of 32 percentage points.

This explains how Donald Trump has been able to seize such a commanding delegate lead despite winning a string of plurality victories, plunging the GOP into the predicament it is in now. Republican rules have a lot of quirks (winner-take-most districts, viability thresholds, winner-take-all triggers, statewide bonuses) that allow a GOP candidate to win most of a state’s delegates even when that state’s allocation method is ostensibly proportional. This was, in part, designed to give a candidate who is doing well early on a boost in delegate momentum for the race to wrap up quicker than it otherwise would.

You can see the effect this would have on the Democratic side: Clinton’s 56 percent of the popular vote would be enough for her to win 64 percent of pledged delegates under GOP rules — just as Trump’s 40 percent of the popular vote has given him about 50 percent of delegates allocated so far.

The biggest change would be in those states where Republicans use a statewide winner-take-all method. In Florida, for instance, Clinton would have won all 214 elected delegates instead of just 141.

Clinton would also take all or nearly all delegates in states that are not winner-take-all but where she won almost all districts. New York, Texas, Maryland, Georgia and South Carolina are in that category. But Sanders would have some bright spots as well: He would receive all of Utah’s and Idaho’s delegates by virtue of crossing the 50 percent threshold, and he would secure 81 of Wisconsin’s 86 because Clinton won only one congressional district.

(One thing to note about GOP rules: In all states that allocate some of their delegates based on district-level results, each district gets three RNC delegates, regardless of the number of Republicans in that district. That’s a major difference with Democratic rules. So applying this scenario will flatten the number of Democratic delegates each district gets. I chose to give each district five delegates instead of three, to account for the fact that Democrats have 64 percent more delegates overall. After accounting for that group, I treated the remaining delegates as at-large delegates.)

These calculations illustrate the arbitrariness of the GOP’s state-by-state disparity. Take the five Northeastern states that voted Tuesday: Rhode Island, Sanders’s lone victory that day, is also the only state among these five in which Republicans use a proportional method.

Statewide proportionality: Little changes

The current system and the statewide proportionality system are off by only eight delegates for each candidate. That is a swing of just 0.2 percent. Clinton would have won 1,670 (55.0 percent of the total) instead of 1,662 (54.8 percent).

I was surprised by this. The current rules provide many apparent opportunities for a state’s delegate count to deviate from a clean proportional allocation. That’s because, although Democrats use proportionality, they don’t apportion all of a state’s delegates at once based on the statewide results. Instead, each state delegation is split into various pools (one for at-large delegates, one for pledged party leaders and one for each congressional district) and then a separate calculation is conducted to apportion each pool according to the corresponding jurisdiction’s results.

There are two ways in which this can matter. For one, the smaller the pool of delegates, the higher the threshold at which a lead in raw votes translates into a lead in pledged delegates — if the pool has an even number. This became an issue in the Democratic race when Sanders’s double-digit victory in the Wyoming caucuses proved insufficient to avoid an equal split of the state’s 14 delegates. Had all these delegates been allocated in a single calculation, Sanders’s 55.7 percent would have translated into eight delegates instead of the seven he got: 55.7 percent of 14 rounds up to eight. But now calculate 55.7 percent of smaller pools of two, four and eight delegates, and you will see that the results round down each time and add up to seven delegates.

Secondly, in districts that allocate an odd number of delegates, having a lead of just one vote is enough to net a whole delegate; but in districts that allocate an even number of delegates, even a large win may not be enough. This odd/even issue has been an object of great fascination in political journalism — see all these 2008 stories.

A separate issue that can create distance between how people vote and the delegate count: Caucus states have a multistage process. Some of their delegates are pledged based on the preferences of county and state convention attendees, rather than based on how people voted on caucus day. The delegate counts projected after the caucuses (events that far more people are allowed to participate in) can get distorted.

Despite all this, the delegate counts changed by only a small amount in the plainly proportional scenario. And this is not a matter of significant distortions in both directions canceling each other out. In 22 of the 43 states and territories, the two counts are identical. (Surprisingly enough, this includes six of the seven states with the most congressional districts that have already voted: Texas, Florida, Illinois, Pennsylvania, Ohio, Georgia.) In 18 others, they are off by just one delegate.

In only three of the 43 states and territories is the difference greater than one delegate for each candidate: Colorado (Clinton would win two more under statewide proportionality), Minnesota (Sanders would win two more) and New York (Clinton would win four more).

The shift in Colorado may be the most striking because the two counts were projected to be the same until Sanders won a greater share of the vote at the state convention April 16 than he did at the March 1 caucuses. That resulted in a gain of two delegates for him. In other words, the reason that a straightforward proportional calculation produces a different outcome than the current count is that the latter is not even directly calculated off of the caucus results.

Minnesota and New York’s shifts are mostly due to districts with an even number of delegates. Minnesota’s 2nd District splits equally despite Sanders’s 17 percentage point win. Clinton has to settle for the same fate in five New York districts, versus only one for Sanders there.

So what’s the takeaway? The Democrats’ delegate allocation rules are more “fair” than the GOP’s rules in the sense that vote shares are translated into delegate shares more faithfully and uniformly — but aspects of the process, such as the use of low-turnout caucuses and some delegates getting allocated based on the results of subsequent conventions, can distort that translation. If the Democrats used Republican allocation, Clinton would have wrapped up the nomination long, long ago. If the Republicans used Democratic allocation, we’d almost assuredly be heading toward a contested Republican convention.