The 2016 primary races are nearing their end, with just over a few months before the national conventions.

The Republican National Convention will be held from July 18 to 21, and the Democratic National Convention will be held July 25 to 28.

If you're confused by how the whole process works, or what happens now that Donald Trump is the only Republican, you're not alone. Here's a guide to help you understand this election cycle.

Do the Republican primaries or caucuses after May 4, 2016, matter?

Not really. As of May 4, 2016, Ted Cruz and John Kasich have suspended their campaigns, which means Trump is the presumptive nominee for the Republican party. While Cruz, Kasich, and even Ben Carson, could still appear on the ballots, voting for one of them won’t make a difference. The last primaries will simply determine how much of a majority Trump receives.  

What is the difference between a caucus and a primary?

The purpose of the caucuses and primaries is the same. They determine how many delegates will represent each candidate at the national conventions. Each party holds its own convention where the delegates vote on the candidate to represent the party in the general election.

But the process is different. A primary functions much like the general election. Voters cast secret ballots, and the number of votes a candidate receives determines the number of delegates that will represent the candidate at the party’s convention.

A caucus is an event where party members meet and discuss the candidates. They are often held in schools, churches or even homes. In some cases, representatives of the candidates have a chance to give a final pitch for their candidate before a vote is taken. The voting is usually done by raising hands or separating into groups, but it can also be a secret ballot.

Who can vote?

Primaries can be open, closed or semi-open.

Open: Any registered voter can vote in either the Democratic or Republican primary.

Closed: Only voters who are registered to a party can vote in that party’s primary.

Semi-open: Independents are allowed to vote in either party’s primary, but voters who are registered to a party can only vote in that party’s primary.

Caucuses are generally closed to the members of each party.

In all cases, voters can only participate in one primary or caucus.

How many delegates are there?

The number of delegates changes slightly throughout the election process. Currently, there are about 4,760 Democratic delegates and about 2,470 Republican delegates.

What are the different types of delegates?

Pledged delegates: A delegate who pledges support for a specific candidate and if elected to attend the national convention, is expected to vote for that candidate. They are allocated to candidates based on the primaries and caucuses. Pledged delegates include congressional district delegates, at-large delegates and PLEOs. 

PLEO: Party leaders and elected officials are pledged Democratic delegates who are delegates in the state they represent. They can be local elected officials or party leadership, and they are selected to be delegates by the DNC.

RNC-member delegates: The RNC-member delegates are the RNC national committeeman, national committeewoman and state chair from each state. In some states they are pledged based on the outcomes of the caucuses or primaries, but in others, they can vote for any candidate at the convention.

Unpledged delegates: The DNC refers to unpledged delegates as superdelegates, who can vote for any candidate at the convention, regardless of the outcome of their state’s caucus or primary. These delegates are members of the DNC, Democratic members of Congress, Democratic governors and current or former Democratic presidents and vice presidents.

How many delegates does each state have?

Each party allocates a different number of pledged delegates to the states.

The Democratic National Committee decides how many congressional district delegates and at-large delegates are allocated to each state based on how many electoral votes a state has and how the state has voted in the past, among other factors. PLEO and unpledged delegates are allocated to the state they reside in.

The Republican National Committee allocates three congressional district delegates per congressional district in each state and 10 at-large delegates. Additionally, it allocates bonus delegates to states based on how the state has voted in the past, whether the state has a Republican governor and other factors. There are three RNC-member delegates in each state.

How are the winners of each state determined?

The parties have slightly different rules for how the winners of the caucuses and primaries are determined. The DNC awards delegates to candidates proportionally based on the outcomes of the caucuses and primaries. But each candidate must meet a 15 percent threshold to win any delegates. The RNC’s process varies from state to state. In some states, they award delegates proportionally. In others, there is a winner-take-all method, which awards all the delegates to the candidate with the highest percentage of votes. There are also some hybrid methods in other states.

How many delegate votes does a candidate need to win the nomination?

A Democratic candidate needs 2,382 delegate votes to with the nomination. A Republican candidate needs 1,237 delegate votes to with the nomination.