The Associated Press

Ever wonder how a news organization calls a race at poll closing, when not one single vote has been counted?

For landslide elections, exit polls sometimes provide enough data to determine the winners. Workers stand outside polling places, asking voters to fill out confidential questionnaires about how they voted.

For more competitive races, analysts may use vote tallies from randomly selected voting precincts to supplement data from the exit polls. Workers report vote totals soon after the polls close, giving analysts a quick look at how the election is shaping up in that state.

For races that are even more competitive, news organizations rely on the AP vote count, the only national source of election results in all U.S counties and other vote-reporting jurisdictions. The AP is deploying more than 5,000 workers today to collect vote results and report them to news organizations — and the public — around the world. The AP will report results for nearly 7,000 races.

Government officials get the final say. Congress verifies the Electoral College votes for president and vice president, while state and county officials certify local election results.

— Stephen Ohlemacher — Twitter