Race to 270
The unusual nature of US presidential elections means a candidate does not have to win the national popular vote to become president.
The result depends on the Electoral College, an institution whose composition is determined by the winner of each individual state.
That means any potential dispute between Republican Donald Trump and Democrat Hillary Clinton resulting from the election would unfold state by state.
The Electoral College is made up of 538 electors, with the share received by each state roughly proportional to its population size.
A candidate must secure 270 votes to win.
What if no candidate hits the magic number?
There is a small chance that Independent candidate Evan McMullin may win Utah's six Electoral College votes, making it more difficult for Clinton or Trump to reach 270.
If no candidate reaches 270 in the Electoral College, the 45th president of the US will be chosen by the House of Representatives in January.
The House elects the president by majority vote, but with each state only having a single vote.
It has decided two presidential elections - that of Thomas Jefferson in 1800 and John Quincy Adams in 1824.
The Senate would elect the vice president, with each senator casting one vote. That raises the possibility of a president and vice president from different parties.
What if it is close?
Many of the procedures for voting in presidential elections are determined by state law, and administered by state officials.
Each state, therefore, has its own rules for conducting recounts.
In Florida, site of the disputed contest between Republican George W Bush and Democrat Al Gore in 2000, a recount is automatically conducted if the difference between candidates is less than 0.5%.
In Wisconsin, where there is no automatic recount, a candidate can request one but must pay the full cost of any recount if it does not change the result.
Beyond a recount, anyone can challenge a state's election process in court.
With the US Supreme Court currently evenly split between liberal and conservative members, any legal challenge could be decided by a lower appeals court - all of which have different political compositions, depending on the state.
The election in numbers
US presidential election in numbers pic.twitter.com/nrryiPzaMq
— RTÉ News (@rtenews) November 7, 2016
Full election coverage | Electoral College explained | Donald Trump | Hillary R Clinton | What the presidential candidates must do to win | US vice-presidential candidates