Joe Raedle/Getty Images
A presidential candidate's podium is seen on the stage in 2016.

A version of this story appeared in CNN’s What Matters newsletter. To get it in your inbox, sign up for free here.

CNN  — 

While the 2024 presidential race seems set in stone as a rematch between President Joe Biden and former President Donald Trump, it’s also true that things happen.

Back in November 1872, for instance, the newspaper publisher and Democratic presidential candidate Horace Greeley died after Election Day but before the casting of Electoral College votes. While it did not affect the outcome – President Ulysses S. Grant easily won reelection – Greeley’s death created the difficult question of what to do with the 66 Electoral College votes he had won.

Most electors, meeting in state capitols, did not cast votes for the deceased Greeley, but rather split them among four other candidates. Congress did not count the three votes that were cast for a dead man.

MPI/Getty Images
Pictured is American abolitionist, journalist and politician Horace Greeley, who edited the New York Tribune.

In the more than 150 years since Greeley’s death, there have been two constitutional amendments related to presidential succession, but there is still some gray area when it comes to an unforeseen event that strikes a presidential nominee or candidate.

Today, polling suggests voters are worried that both Trump and Biden are too old for the job. Trump will be 78 on Election Day in November, and Biden will turn 82 later that month. Without being macabre, it’s worth knowing what would happen if, for whatever reason, either man was unable to continue with the race.

Replacing either man on the ballot – not that anyone is seriously talking about it – would be a messy and chaotic process that would uncover divisions and disagreements within the political parties. No one knows for sure what would happen if a candidate died or for some reason needed to withdraw from the race.

Here’s a look at the rules for Republicans and Democrats as they currently stand.

What happens if a candidate cannot continue his or her campaign?

The process of replacing a presidential candidate very much depends on when the vacancy occurs – during the primary process and before the party convention; during the convention or after the convention; or before or after people vote in November.

What happens if a vacancy occurs during the primary process?

While Trump and Biden are in total command of the respective races to be the Republican and Democratic presidential candidates, that process will play out between now and June as states conduct primaries and caucuses and assign delegates based on the results.

If a vacancy on either side happens before most of those primaries were to occur, it’s possible that another candidate could emerge and rack up some delegates. But since filing deadlines have already passed for many primaries, it’s unlikely any single candidate, other than Trump or Biden, could rack up enough delegates to win the nomination before party conventions this summer.

It is, however, possible that states could decide to delay their primaries, according to Elaine Kamarck, a member of the Democratic National Committee rules committee and a senior fellow at the Brookings Institution who has studied the issue. Republicans will hold their convention in Milwaukee in July, and Democrats will hold theirs just to the south in Chicago in August.

Most delegates will have been awarded by the end of March. Biden has not faced serious opposition in the Democratic primary, has won every delegate at stake so far and needs to win at least 1,968 of 3,934 to secure the nomination on the first ballot of voting.

On the Republican side, Trump has won every contest so far and ultimately needs 1,215 of 2,429 delegates. His top rival, former South Carolina Gov. Nikki Haley, is far behind Trump in the delegate race.

What if a vacancy occurs after the primaries and before or during the convention?

If the leading candidate was to drop out of the campaign after most primaries or even during the convention, individual delegates would likely decide the party’s nominee on the convention floor.

That would shine a spotlight on the normally niche question of who those actual delegates are.

There would be a messy political battle in every state over who would get to be a delegate (if the vacancy happened before many of those people were chosen) and then who they would ultimately support. Even people who did not run primary campaigns could ultimately be considered.

You can assume, for instance, that Vice President Kamala Harris would be a top contender to be on the ballot if, for some reason, Biden left the race. At the same time, given Haley’s weakness in primaries, it seems unlikely that Republicans would coalesce around her if Trump was unable to run.

On the Democratic side, there would also be another group to consider: the “superdelegates,” a group of about 700 senior party leaders and elected officials who are automatically delegates to the convention based on their position. Under normal party rules, they can’t vote on the first ballot if they could swing the nomination, but they’re free to vote on subsequent ballots.

Has anything like this ever happened before?

The modern primary and caucus system evolved only in recent generations as voters demanded more involvement in the nominating process.

The election that sparked change was in 1968, when President Lyndon B. Johnson decided not to run after an embarrassing finish in New Hampshire’s primary. Johnson won, but just barely.

When he dropped out of the presidential race, it set off a chaotic dash to replace him. One candidate who jumped in the race, Sen. Robert F. Kennedy, was assassinated in Los Angeles just after winning the California primary, creating the difficult question of who his delegates should support.

The ultimate Democratic winner that year, Vice President Hubert Humphrey, amassed his delegates in states that did not conduct primaries, securing enough support to win the nomination.

Violence on the streets of Chicago around the convention marred the event and helped inspire the system of primaries and caucuses we have today where voters pick presidential candidates through delegates bound to support a specific candidate.

What if a candidate left the race after the convention?

It would take a drastic event for a candidate to leave the race in the few months between a party’s nominating convention in the summer and the general election in November.

Democrats and Republicans have slightly different methods of dealing with this possibility. You can imagine the end result would probably be that the running mate stepped up to be on the general election ballot, but that is not necessarily guaranteed.

Democrats – The Democratic National Committee is empowered to fill a vacancy on the national ticket after the convention under party rules, after the party chair consults with Democratic governors and congressional leadership.

Republicans – If a vacancy occurs on the Republican side, the Republican National Committee can either reconvene the national convention or select a new candidate itself.

Would the running mate automatically become the nominee?

An in-depth Congressional Research Service memo also notes that if an incumbent president becomes incapacitated after winning the party’s nomination, the 25th Amendment would elevate the vice president to the presidency, but party rules would determine who rises to become the party’s nominee.

Neither party, according to CRS, requires that the presidential candidate’s running mate be elevated to the top of the ticket, but that would obviously be the most likely scenario.

Has a candidate ever left the race after the convention?

In modern times, per CRS, the Democrat running for vice president in 1972, Sen. Thomas Eagleton, was forced to step aside after the convention after it was discovered that he was treated for mental illness (1972 was a very different time! Today, thankfully, there is not nearly the stigma attached to mental health).

The DNC actually needed to convene a meeting to affirm Sargent Shriver as Democratic nominee George McGovern’s second-choice running mate.

What if a president-elect was incapacitated after the election?

If a president-elect was to die, timing is again important.

Under the Constitution, it is electors meeting in state capitols who technically cast votes for the presidency. While some states require that they vote for the winner of the election in their state, in others they have leeway.

The CRS memo, which cites several congressional hearings on the subject, suggests it would clearly make sense for a vice president-elect to simply assume the role of president-elect, but the law itself is murky.

Under the 20th Amendment, if a president-elect dies, his or her running mate, the vice president-elect, becomes president.

There could be some question, for instance, about when exactly a person becomes president-elect. Is it after the electors meet in December, or after Congress meets to count Electoral College votes on January 6?