Americans are voting to choose their next president.

The numbers running up to election day tightened amid crises affecting both Democratic contender Hillary Clinton and her Republican rival Donald Trump.

Use our tracker to see how it has played out and scroll down for some explanation on what the polls show.

Please enable Javascript to view our poll of polls chart. About BBC poll of polls The BBC poll of polls looks at the five most recent national polls and takes the median value, ie, the value between the two figures that are higher and two figures that are lower. See individual polls

Who is going to win?

Hour-by-hour guide to election night

Can Trump pull off a Brexit-style upset?

Who will win? Play our game to make your call

All you need to know about the US election

US election glossary: A-Z guide to political jargon

What do we know from early voting?

Some form of early voting has been in place in most states across the US, meaning much of the electorate have cast their ballot before election day.

Although those votes are not counted until polls close on Tuesday, some states release data on the number of early votes and how many were from registered Republicans or Democrats.

In Nevada, for example, we know that of nearly 800,000 votes cast before early voting closed on 4 November, 42% were by registered Democrats while 36% were by registered Republicans. Those numbers aren't too different to 2012, when Barack Obama took the state with a winning margin of 6.7%.

Of course, there's nothing to say that those registered with one of the parties will definitely vote that way, especially since both Mr Trump and Mrs Clinton have made direct appeals to supporters of the other party who may be disillusioned with their candidate.

But in general, the Nevada data comes as a surprise, because much of the recent polling in the state has suggested Donald Trump is in the lead. That doesn't necessarily mean the polls are wrong - Mr Trump could have a groundswell of support on election day - but if they are, it may suggest they are finding it hard to account for the surge in Hispanic voters.

That Hispanic surge has been noticeable in several states, including Arizona, Colorado, Florida and North Carolina, according to analysis by Catalist, a data firm working for Mrs Clinton campaign team.

In previous elections it has been less clear who Hispanic voters would back (Republican President George W Bush won 40% of their votes in 2004), but this year it's clearer thanks in part to Mr Trump's tough rhetoric on immigration and Mexicans. Research group Latino Decisions projects that 79% of Hispanic voters will support Hillary Clinton.

One thing we know for sure is that far more people voted early in this election than in the past. In 2012, the total number of early votes cast was just over 32 million. More than 40 million people voted early in 2016.

How important are national polls?

It's a tough task to gauge the mood of a nation that is home to more than 300 million people but that doesn't stop the pollsters from trying.

National polls tend to have a sample size of about 1,000 people or more and can track movement and general opinion pretty well.

But the US election is won and lost in swing states and decided by the electoral college system.

This means that polls in states where either candidate could win (Florida, Ohio and Pennsylvania, to name just a few) play an integral role in election projections.

What is the US electoral college?

How does a US presidential election work?

Who is ahead in the battleground states?

We've identified 13 states that can be considered battlegrounds in this election.

The map below shows them and which way they're likely to vote based on data collected by polling resource website Real Clear Politics.

If those states stay the same colour (blue for Clinton, red for Trump) on election day - and both candidates win the remaining states they're expected to - Hillary Clinton would be the winner.

However, Mr Trump has recovered some ground in several states recently, including Arizona and Nevada. In Florida, he leads by just 0.2% and in New Hampshire, Mrs Clinton leads by just 0.6%.

The latest poll averages in the battleground states are shown in the chart below. Some states are polled more frequently than others; not all the polls below will be showing a result from the same survey period.

Image caption Each state shows a rolling average and some will be over a longer period of time than others

Predict the president

Who will win? Play our game to make your call

How did FBI probe affect Clinton's numbers?

Image copyright Getty Images

The bad news for Hillary Clinton is that the polls had already begun to tighten both nationally and in some key battleground states before FBI chief James Comey announced a new inquiry into her email use on 28 October.

In the ABC News/Washington Post tracking poll for example, Mrs Clinton was ahead of Donald Trump by 12 points on 23 October, but that lead had narrowed to one point a week later.

Enthusiasm for Mrs Clinton had slipped slightly in that poll, with the number of her supporters who said they were very enthusiastic about her down from 51% to 47%.

Polls do tend to tighten as election day approaches anyway, but it appears news of the inquiry did have some effect on Mrs Clinton's numbers.

Mr Comey announced on 6 November that the inquiry had found nothing to change the bureau's conclusion this summer that she should not face criminal charges - but the damage may already have been done.

How FBI email verdict affects election

Clinton FBI probe: What we know

How have scandals affected Trump's numbers?

Image copyright AFP

Donald Trump has been hit by several scandals since his campaign began. The most notable was the release on 7 October of a video in which he can be heard boasting about sexually assaulting women. He said his comments were "just words" and denied ever having groped a woman - but several have since come forward alleging just that.

This would have been enough to end the campaigns (and political lives) of many candidates, but Mr Trump has survived. Indeed, one CNN poll released on 24 October put him on 45% - exactly the same figure he was on in the previous CNN poll released on 3 October. Both polls had Mrs Clinton leading on 51%.

Mr Trump's ability to continually poll around 40% nationally while rarely going above 45% has led many analysts to describe his support as having a high floor but a low ceiling. Mr Trump got more primary votes than any Republican in history but the polls show he has struggled to attract voters from outside his large and loyal base.

What are the sexual assault allegations against Trump?

Trump faithful undeterred by polls and scandals

Should we trust the polls?

As election day approached, Donald Trump was increasingly outspoken about the polls, describing those that show him behind as "dirty" and accusing polling companies of "tremendous dishonesty".

But Mr Trump hasn't provided any evidence to back up his claims and there is nothing to suggest that any national poll has been intentionally skewed to favour one candidate over the other.

And despite his rhetoric, Mr Trump's campaign team seem to believe the numbers. "Nate Silver's results have been similar to ours," digital director Brad Parscale told Bloomberg, referring to the polling analyst at FiveThirtyEight, which has continually shown the Republican candidate trailing Hillary Clinton.

Polling isn't easy and the companies carrying them out have to overcome a number of challenges in the process - but research shows they are more accurate the closer we get to election day.

Trump says the election is rigged. Is he right?

Are Trump and Clinton the only candidates?

No. They're the only candidates that stand a real chance of winning the race but there are other candidates in the running. The rules around getting on the ballot differ from state to state but most voters will have two main alternatives to Hillary Clinton and Donald Trump.

Green Party candidate Jill Stein, 66, is a doctor and activist who is hoping to pick up Democrats who backed Bernie Sanders and continue to rally against Mrs Clinton. She's currently picking up about 2% of the vote nationally.

Former New Mexico governor Gary Johnson, 63, is standing for the Libertarian Party and focusing his efforts on attracting Republicans uneasy with Mr Trump. In September, his support was at 9% nationally but that has since dropped to about 5%.

One independent candidate who has attracted some attention is Evan McMullin, a former CIA operative who looks to be in with a shot of winning in his home state of Utah. One state poll had him just two points behind the Republican candidate and six ahead of Mrs Clinton at the end of October.

If he manages a surprise victory, he would become the first third-party candidate to win any state since 1968.

Will third party candidates decide US election?