(Joshua Lott for The Washington Post; Melina Mara/The Washington Post; Joshua Lott for The Washington Post; Charles Ommanney/The Washington Post)

The key to winning the presidential nomination isn’t winning Iowa, or New Hampshire, or certainly the news cycle. It is winning delegates.

But how do primary and caucus outcomes translate into delegates? The answer has always been a bit mysterious.

To solve this mystery, I talked to Josh Putnam, a political scientist who blogs at the essential Frontloading HQ and is an expert on presidential primary rules.

The big question now is how quickly any of the Democratic or Republican candidates can get to a majority of delegates and win the nomination. How does delegate math work?

Before we talk delegate math, we actually have to talk candidate math. How many delegates a candidate wins depends a lot on how many candidates there are. And that depends on two things: winnowing and the calendar.

With only two candidates, as on the Democratic side, it is often easier to clinch the nomination more quickly – compared to a situation, as on the Republican side, with multiple candidates.

This is why winnowing matters. The more quickly the field is winnowed, the sooner the eventual winner can accumulate a majority of delegates.

And this is why it matters how long each of the remaining Republican candidates can compete. If the field is winnowed to two candidates fairly quickly, it could be over soon. But if the field plateaus at three or four candidates, we could be in for a much longer primary season.

What about the calendar?

The field of candidates is shaped by which states vote in which order and at what time.

For many years, states fought for influence by moving their primary or caucus earlier on the calendar — what’s known as “front-loading.” The 2000 and 2008 calendars fit that description. Front-loaded calendars tend to be an advantage for candidates with more resources and name recognition.

Has that changed?

There’s less front-loading now. Since 2008, changing national party rules sought to require every state except Iowa, Nevada, New Hampshire and South Carolina to hold their contests after February. This forced most states to schedule their primaries in March or later. This happened to the Republican primary in 2012.

There was not a lot of change in either party’s primary calendar from 2012 to 2016. The most important change was that Arkansas, Kentucky, North Carolina and Texas moved their primaries earlier — into March — and Florida moved later.

Does this change help any particular candidate in 2016?

For Democrats, this shift invited more African Americans into the process earlier. At this point, that appears to help Hillary Clinton.

For Republicans, this shift tilted the front half of the calendar in a more conservative direction. If there were consolidation behind a conservative candidate, that candidate could win delegates early and hold on to clinch the nomination. The downside for a conservative is that after March 15, there will be no more southern contests.

So let’s talk delegates now. How do parties count delegates?

Counting delegates means answering two questions: How many delegates does each state get, and how are those delegates assigned to candidates?

The number of delegates depends on two things: Population and loyalty to the party are the basic determinants.

For Republicans, each state receives three delegates for each congressional district — a population component — and five delegates for each senator. There also are three automatic party delegates and bonuses based on whether the state voted for the Republican nominee in a previous presidential election, or has a Republican governor, Republican senators, or Republican-controlled state legislative chambers. That is the partisan loyalty component.

The 10 base delegates and any bonus delegates are considered at-large delegates. These delegates are allocated based on the statewide results in the primary or caucus. The congressional district delegates can be allocated based on the statewide vote or on the results in each congressional district. But each district gets just three delegates, regardless of whether they are generally Republican districts. Although this helps less Republican districts relative to districts packed with Republican voters, a great many of those districts are later on the calendar.

For Democrats, it works similarly except that congressional districts with more Democrats actually do get more delegates.

So how are delegates then assigned to candidates?

The Democrats have a proportional system: Candidates get delegates in proportion to their vote share in a state’s primary or caucus.

On the Republican side, things are different. Traditionally, the Republican National Committee let states decide how to allocate delegates, and that meant states adopted different rules. Some states use a more proportional rule, some use a winner-take-all rule, and some use a combination.

Let me guess: It gets more complicated from there

Yep. The first key detail is nobody is using a strict proportional rule. The Democrats require that candidates get at least 15 percent of the vote to win any delegates.

The Republican National Committee does not require that states use a threshold, but it does allow them to set a threshold as high as 20 percent. Most states have done so. Georgia and a number of states holding primaries on March 1 have the maximum 20 percent threshold.

But Iowa has no threshold, which is why so many candidates won delegates coming out of Iowa. Other states like Kentucky (5 percent), Minnesota (10 percent), or Arkansas (15 percent) have qualifying thresholds somewhere in between.

Why are these thresholds important?

The higher the threshold, the fewer the candidates who will win delegates. A threshold of 20 percent means that, at most, four candidates will win delegates. This winnows the candidates more quickly.

But what if no candidates meet this threshold, or only one candidate does?

Different states deal with this in different ways. Vermont simply lowers the threshold if no candidate qualifies. Texas Republicans, on the other hand, drop the threshold altogether if no candidate hits the qualifying threshold.

If only one candidate qualifies for delegates, Texas Republicans make the winner and runner-up divvy up the at-large delegates. In other states, such as Idaho, if only one candidate qualifies, then that candidate is allocated all of the delegates.

Such backdoor winner-takes-all situations are specified in some state party rules and left open to interpretation in others where it the practice is not expressly prohibited.

So proportional systems really aren’t proportional?

That’s right. Winning 20 percent of the vote does not mean winning 20 percent of the delegates, as is often suggested. Rather, winning 20 percent of the vote means winning more than 20 percent or even all of the delegates in some rare cases. Most proportional systems should be called “winner-take-more systems.”

I’ll hazard another guess: Winner-take-all systems actually aren’t winner-take-all

Yes. In particular, there are a lot of myths about the Republican nomination process.

The myth goes like this: The GOP process was winner take all until 2012. Then in 2012, the states that held primaries or caucuses through March 31 were proportional, and everything thereafter was winner take all. Now, in 2016, it’s the same except the “proportionality window” closes March 15 instead of March 31.

Why is that a myth?

It ignores that proportional systems aren’t proportional, as noted.

And it ignores that, in some states, Republican delegates are awarded based on the results in both the state and in the congressional districts. So a candidate who loses the statewide vote can still win delegates if they win at least one congressional district.

And in states that award delegates based only on congressional districts, the result can be more proportional.

In either case, the result is winner take more rather than truly winner take all.

But winner take more is still an advantage for the front-runner, right?

Yes. And, in fact, there are a few other quirks that also give an advantage to the leading candidate.

For Republicans, one quirk is the backdoor winner-take-all situation I mentioned. As more and more candidates are winnowed, this situation becomes less likely, but the odds of hitting a majority winner-take-all trigger increases. Under such a scenario, the Republican delegate leader has a chance to more quickly vanquish a threat.

For another, the rules in most states can over- or under-allocate delegates simply because of rounding. Sometimes the initial allocation is less or more than the state’s actual number of delegates.

Unallocated delegates are typically allocated to the winners and “over-allocated” delegates tend to be taken away from candidates at the bottom of the order. This is consequential only at the margins, but is another built-in advantage for winning or leading candidates.

So what do the delegate allocation rules mean for 2016? Let’s look at the Democrats first.

Clearly the proportional rules used by Democrats — even if not perfectly proportional — make it harder to arrive at a winner quickly. But this isn’t necessarily an advantage for Bernie Sanders. Proportional rules also can make it harder for an underdog to close even a small advantage that the front-runner develops.

And the Republicans?

For now, Republicans are allocating delegates on a more-or-less proportional basis. After March 14, states are allowed to allocate delegates in a truly winner-take-all fashion.

Republican candidates might hope, therefore, that even if they aren’t the delegate leader as of March 14, they can win some later primaries outright and therefore win all the delegates.

In practice, however, it is more complicated than that. First, there are only nine truly winner-take-all states. But also, time tends to run out on candidates lagging in the delegate count. Recent cycles have demonstrated that the Republican candidate leading the delegate count at the point on the calendar where 50 percent of the delegates have been allocated goes on to win the nomination (clinching some time around the 75 percent mark on the calendar).

So even if winner-take-all rules make a comeback scenario possible, it does not make it probable.

Finally, let’s talk about everyone’s favorite scenario: No candidate gets a majority of delegates, and we head to a “contested convention.” What happens then? Could delegates that a candidate “won” in a primary end up voting for another candidate at the convention?

So this gets at whether a convention delegate is “bound” to a candidate – that is, they are obligated by the rules to vote for that candidate – or whether they’re merely “pledged” to that candidate.

Democratic rules do not refer to bound delegates. The delegates are seemingly only loosely pledged to a candidate based on the results of the primaries and caucuses.

But that loose pledge is stronger than it would appear. In some states, candidates hand-pick delegates and file their names with the state or party. Any delegates the candidates win come from this list, and so the bond between candidate and delegate is likely to be strong. In general, pledged Democratic delegates are likely to be loyal to their candidate if that candidate is still viable and has not “released” the delegates to vote for another candidate.

Meanwhile, the Democratic convention also features “superdelegates” – most of whom are party leaders – who are unpledged and free to choose a candidate regardless of the results in the primaries and caucuses.

How does it work at the Republican convention?

It’s quite different. For Republicans, there are both bound and pledged delegates, but the vast majority (more than 95 percent) are bound.

The modest number of pledged delegates are from a small group of states that opted to forgo a preference vote at their caucuses or state conventions (for instance, North Dakota). If the Republican convention was contested, those pledged delegates could support whomever they prefer.

And, unlike Democrats, Republican candidates do not hand-pick delegates. This opens up the possibility that some delegates who are “bound” to a candidate because of the primary or caucus outcome actually favor another candidate.

How could that matter at the Republican convention?

On the first ballot (or in a handful of states beyond that), bound delegates will have to vote for the candidate they are bound to. But if no candidate gets a majority on the first vote, then it gets interesting. Delegates bound to one candidate but aligned with another could then be crucial.

But we’re still talking about a long-shot scenario, right?

Sure, but it’s not as long of a shot as it perhaps once was.

Nevertheless, the system of delegate allocation in both parties is designed to convert the chaos of the invisible primary — if there is any left over — into order and typically before the end of primary season.

If 2016 proves any different, it will be because of the changes I’ve described here.