The US presidency is described as the world's hardest job and the election campaign is said to be its toughest job interview. How do you run for president? BBC News explains the process.
The early stages
A politician with presidential ambition usually forms an exploratory committee to test the waters and raise money. This can begin up to two years before the election.
The US constitution requires only that a person be a "natural born citizen" of the US, at least 35 years old, and a resident of the US for 14 years.
If the candidate attracts significant favourable notice from the news media, party officials, prospective campaign strategists, and donors, he or she formally declares his or her candidacy and launches campaigns in key early states.
Not just anyone can credibly stand for election: In the last 70 years, every non-incumbent major party presidential nominee has been either a sitting or former US senator, governor, vice-president or five-star general.
However, the current Republican race has seen the rise of outsider candidates such as businessman Donald Trump and retired neurosurgeon Ben Carson who have not held elective office.
On the Democratic side, Hillary Clinton (a former first lady, New York senator and secretary of state) and Bernie Sanders (a member of Congress since 1989) have more traditional presidential resumes.
The nomination fight
After declaring, the candidates begin vying for their party's nomination for the presidency.
Typically - but not always - they spend the next several months campaigning heavily in the early primary and caucus states of Iowa, New Hampshire and South Carolina.
Those states hold the first contests of the campaign in the January before the election, and good performances there can make or break a candidacy.
US primaries and caucuses
Voters in each of the 50 states, plus Washington DC and some US territories, select party delegates who in most cases pledge to support a particular candidate.
Some states use a caucus - a local meeting system - rather than primaries.
The primary election campaign lasts until about June, by which point one candidate has amassed enough delegates to win the nomination or has driven every other contender from the race.
The party convention
The national party conventions are held in the late summer about two and a half months before the election.
There, the parties formally nominate the candidates chosen by party voters in the state primaries and caucuses.
Before or at the convention, the nominee picks a running-mate, sometimes from among the defeated rivals.
Because the nominee is almost always known before the start of the convention, the conventions are mostly geared toward promoting and celebrating the nominee and laying out the party's message and agenda.
However, some analysts have suggested that this Republican convention could be a "brokered convention" where the the result is decided over rounds of negotiations and voting among party delegates.
Some in the Republican Party are concerned that the current front-runner Mr Trump - a political novice with hard line views on immigration - could hurt the party in Congressional races, particularly among Latino voters.
The final lap
After the conventions, the candidates fully square up against each other on the campaign trail, over the airwaves and in widely viewed debates.
Each spends millions of dollars on advertising and a major flurry of state-by-state campaigning.
This year, there will be three debates between the presidential candidates and one between the vice-presidential candidates, according to the Commission on Presidential Debates.
In the final weeks, the contenders typically concentrate their attention on big so-called "battleground" states, where the electorate is more or less evenly divided and hence the outcome is uncertain.
Hordes of campaign volunteers and paid staff converge on the key states, where they work the telephones and go door to door to try and persuade voters to go to the polls to support their candidate.
Watch for the candidates to blanket the airwaves with adverts in Florida, Ohio, Pennsylvania and Virginia.
American presidential elections are always held on the first Tuesday after the first Monday in November. This year, it is 8 November.
Voters do not, technically, participate in the direct election of the president.
They choose "electors", who are pledged to one or another candidate, in a process known as the US electoral college.
Each state has a certain number of electors to the college, based on the size of its population.
In almost every state, the winner of the popular vote gets all the electoral college votes in that state.
Because of this system, a candidate can take the White House without winning the popular vote, such as in the 2000 contest between George W Bush and Al Gore.
In the days and weeks after the election - if the vote is decisive - the victor will assemble a cabinet and begin crafting a more thorough policy agenda.
Meanwhile, the departing "lame duck" president works to shape his legacy and begins packing up his belongings.
Under the US constitution, the president is inaugurated on 20 January of the year following the election.
For your efforts, you become a virtual prisoner in the White House, unable even to walk across the street without a contingent of Secret Service agents and a gaggle of aides.
You will have to endure 24-hour scrutiny and criticism of your every word and action, surround yourself with aides planning tell-all memoirs and scheming among themselves for power, and work 12-hour days in which your schedule is planned almost down to the minute.
Expect a constant battle with a hostile news media and an opposition party dedicated to frustrating and impeding your every move, from your grand economic agenda to your lowest appointments.
Only difficult decisions reach your desk - the easy ones have all been answered at lower levels of your administration.
But you will have the chance to put your personal stamp on a country of 318 million people and indeed on the entire world.
You will shape its economy, culture and society, and win a chapter for yourself in the history books alongside George Washington, Abraham Lincoln, Franklin Roosevelt, Ronald Reagan and other American luminaries.