The Senate count is more complicated than the count for the House of Representatives. Counting of first preferences begins on election night but the full count cannot be completed until several weeks after the election.
To be elected to the Senate, a candidate needs to gain a quota of the formal votes. The quota is calculated by dividing the total number of formal ballot papers by the number of senators to be elected plus one, and then adding one to the result (ignoring any remainder).
(Number of formal ballot papers / (Number of senators to be elected + 1)) + 1 = Senate quota
This is how the quota for NSW was calculated at the 2013 Senate election.
(4 376 143 / (6 + 1)) + 1 = 625 164
Therefore the quota, or number of votes required to be elected, in NSW at the 2013 federal election was 625 164.
Ballot papers are sorted according to which candidate or group has received the number '1' preference on each ballot paper. Candidates who receive the quota, or more, of first preference votes are elected immediately.
As a general rule, when a candidate is elected with a surplus of votes, that surplus is transferred before any exclusion is undertaken.
Any surplus votes from elected candidates (votes in excess of the quota they need), are transferred to the candidates who were the second choice of voters. Because it is not possible to determine which votes actually elected the candidate and which votes are surplus, all the elected candidate's ballot papers are transferred at a reduced rate.
Surplus / Number of votes for candidate = Transfer value
Candidate A gains 1 000 000 votes. If the required quota was 600 000 the surplus would be 400 000.
The transfer value for candidate A's votes would be:
400 000 / 1 000 000 = 0.4
Candidate A's ballot papers (1 000 000) are then re-examined in order to determine the number of votes for second choice candidates.
If candidate A's ballot papers gave 900 000 second preferences to candidate B, then candidate B would receive 360 000 votes (900 000 multiplied by the transfer value). These votes would be added to the votes candidate B received in the first count.
If candidate B has reached the quota, they are elected. If candidate B has any surplus votes a transfer value would be calculated and votes would be transferred in the same way.
As surplus votes are transferred, other candidates may be elected. However, if all surplus votes from elected candidates are transferred and there are still unfilled positions, further counting is undertaken as explained below.
Starting with the candidate who has the lowest number of votes, unelected candidates are excluded from the count. Their ballot papers are distributed to the remaining candidates based on preferences. If any of the remaining candidates obtain a quota through this process of distribution, they are elected. Their surplus (if any) is transferred before any other candidates are excluded. The above process continues until all Senate positions are filled.
Counting for the Senate takes longer than the House of Representatives because of the complex nature of the counting system used. It is some weeks before all Senators are declared elected.
The declaration of the poll for the Senate is made by the Australian Electoral Officer for that state or territory.