Donald Trump has a point. (Yes, you read that correctly.) After getting shut out at the Colorado conventions, Trump has been complaining that the Republican primary process is undemocratic and rigged. I don’t agree with the “rigged” part, as the rules have been known for some time, but it’s true that some Republican votes are worth a lot more than others. “One person, one vote” — or the idea that every voter should have equal say in an election — is not the rule in the GOP primary system. The irony, however, is that Trump has benefited from this imbalance.

But before we get to Trump, let’s talk about delegates overall. I’ve collected all the votes cast and delegates allotted in every contest so far. In some cases, such as Massachusetts, where delegates are awarded only at the statewide level, this means just looking at the state as a whole. In others, such as Georgia, delegates are given out at both the congressional district and statewide level, so I’m treating those as individual contests. (I’m not including states that award delegates through conventions, which involve a multi-tiered process that doesn’t really include “votes.”)

The number of delegates that one vote will buy you varies a ton:

Not surprisingly, votes have the most purchasing power in caucuses, where turnout is typically lower than in primaries. The power of one voter in the Northern Marianas, for example, is ludicrously high, at 52 votes per delegate. Indeed, two of the three jurisdictions with the lowest ratios of votes per delegate are commonwealths or territories. In Washington, D.C., just 2,839 voters determined how 19 delegates would be awarded (that’s 149 votes per delegate).

Indeed, Washington, D.C., is emblematic of a larger pattern: Blue areas have a lot more power per voter in Republican primaries because the GOP gives a lot of weight to the overall population — rather than the number of Republicans present — to determine how many delegates each state gets. When delegates are assigned by congressional district within a state, Democratic- and Republican-leaning districts get an equal number of delegates assigned. We’ll see that at work in New York next week, but we’ve also already seen this at play in places such as Vermont, where just 61,022 votes were cast and 16 delegates were awarded, for a ratio of 3,814 votes per delegate. The overall ratio for the 169 contests I studied is 21,337 voters per delegate.

On the other hand, voters in the most Republican-rich places have the least influence. For example, in Wisconsin’s 5th District (home to the famously Republican Waukesha County) three delegates were awarded to the winner among 191,735 voters — that’s 63,912 voters per delegate. Even within certain states, Republicans living in blue areas have a lot more influence than Republicans living in red areas. For example, Illinois’ 4th District (which President Obama won with 81 percent of the vote in 2012) had a votes-to-delegate ratio of 4,989 to 1, while the state’s 18th district (which Obama lost with just 44 percent of the vote) had a ratio of 43,679 to 1.

So, yes, the playing field is tilted, but it’s tilted in Trump’s favor; he’s been running downhill. You can see this in the table below, which shows Trump’s percentage of the vote in each state compared with the percentage of the delegates he won there. In a perfectly “fair” system, the two numbers would match perfectly.

JURISDICTION VOTES DELEGATES DIFFERENCE South Carolina 32.4% 100.0% +67.6 Florida 45.7 100.0 +54.3 Arizona 45.9 100.0 +54.1 Illinois 38.8 78.3 +39.4 Missouri 40.8 71.2 +30.3 Alabama 43.4 72.0 +28.6 Northern Mariana Islands 72.8 100.0 +27.2 Tennessee 38.9 56.9 +18.0 Georgia 38.8 56.6 +17.8 Vermont 32.7 50.0 +17.3 Hawaii 42.4 57.9 +15.5 Mississippi 47.3 62.5 +15.2 New Hampshire 35.2 47.8 +12.6 U.S. overall 37.0 47.6 +10.6 Virgin Islands 6.4 16.7 +10.3 Idaho 28.1 37.5 +9.4 Arkansas 32.8 40.0 +7.2 Maine 32.6 39.1 +6.5 Michigan 36.5 42.4 +5.9 Alaska 33.6 39.3 +5.6 Texas 26.7 31.0 +4.2 Massachusetts 49.3 52.4 +3.1 Oklahoma 28.3 30.2 +1.9 Kentucky 35.9 37.0 +1.0 Nevada 45.7 46.7 +0.9 North Carolina 40.2 40.3 +0.1 Virginia 34.7 34.7 0.0 Minnesota 21.3 21.1 -0.2 Kansas 23.4 22.5 -0.9 Iowa 24.3 23.3 -1.0 Louisiana 41.4 39.1 -2.3 Puerto Rico 13.1 0.0 -13.1 Washington, D.C. 13.8 0.0 -13.8 Utah 14.0 0.0 -14.0 Wisconsin 35.1 14.3 -20.8 Ohio 35.6 0.0 -35.6 Trump usually earns a higher percentage of delegates than votes Source: The Green Papers

Trump has won a higher share of delegates than votes in 24 of the 35 contests studied (67 percent), most notably in winner-take-all contests. Winner-take-all statewide contests are less democratic than winner-take-all by congressional district (in the sense that the delegate allocation mirrors the vote). And winner-take-all by district is less democratic than simple proportional allocation. Trump benefited most in South Carolina, which awarded all 50 of its delegates to Trump even as he won a little less than a third of the vote. He also took all the delegates in the winner-take-all states of Arizona and Florida, while earning less than 50 percent of the vote in each. In 40 percent of the contests, Trump did at least 10 percentage points better in the delegate race than in the actual voting.

Listen to the latest episode of the FiveThirtyEight politics podcast.

The disconnect between votes and delegates hasn’t always worked to Trump’s benefit, though. Ohio was winner-take-all, and Trump lost it to John Kasich. Trump didn’t do much better in Wisconsin last week, where he got only 14 percent of the delegates despite winning 36 percent of the vote. Those, however, are the exceptions. Trump’s vote percentage was 3 points higher than his delegate percentage in just five of 35 contests.

Overall, Trump has won 37 percent of the vote in the 35 contests, while winning 48 percent of the delegates. Even if you include the conventions, where we don’t have any good measure of vote total, Trump has won 45 percent of the delegates. If Republicans were to allocate delegates the way Democrats do, Republicans would be much closer to a 1-to-1 votes-to-delegates ratio. That system would also result in Trump’s having pretty much no shot at winning a majority of delegates heading into the Republican National Convention.

Now, if Trump doesn’t win on the first ballot in Cleveland, that’s when the undemocratic nature of the Republican primary could truly work against him. After the first ballot, a good chunk of delegates will be free to choose whoever they want, regardless of whom people voted for back home. And all indications are that most won’t vote for Trump.

CORRECTION (April 14, 10:48 a.m.): An earlier version of the first table in this article gave an incorrect ratio of delegates per vote in Illinois. It is 1/95,601, not 1/956,011.