As called for in the US constitution, the electoral college serves to officially elect the president and vice president. It is made of 538 electors – a winner must have at least 270 – who cast their vote in accordance with the results of the state they are there to represent.
Each state has votes equal to the number of people it sends to Congress - one vote for each of two senators and further votes for each member of the House of Representatives.
Representation in the House is weighted according to a state's population. The District of Columbia has three electors in the college.
In nearly all states, whoever wins the popular vote gains all the electoral votes.
All but two states – Nebraska and Maine – allocate their electoral votes on a winner-take-all basis. Though the members of the electoral college were originally permitted to vote however they chose, they are now expected to vote for whoever won the majority or plurality of votes in their state.