
If Trudeau wins a majority of the 338 seats in the House of Commons, he will stay on. A party needs at least 170 seats for a majority. The Liberals currently have 177 seats. If Scheer wins a majority, he would take over as prime minister after a two-week transition period.

To govern Canada, a prime minister must show that he or she has the confidence of the House of Commons, the elected lower chamber of Parliament. If the result is a minority, the incumbent prime minister has the opportunity to test their standing with a vote of confidence. This would be the case even if Trudeau wins fewer seats than Scheer. With 160 seats or more, Liberal insiders say Trudeau will most likely govern as though he has a majority, effectively daring the opposition to bring him down in a confidence vote. If the Liberals get fewer than 160 seats, he will seek an arrangement with the minority opposition New Democratic Party (NDP) or the Greens, who are also both left-leaning.

If Trudeau decides to test the confidence of the House, he could first swear in a cabinet during a ceremony presided over by Governor General Julie Payette, the Canada-based representative of the head of state, Queen Elizabeth. Assuming Trudeau tries to govern either alone or with another party, he would then convene Parliament. This does not have to happen immediately, since the rules dictate Parliament only has to meet once a year.

If Trudeau were to lose his first confidence vote, he could request another election but in all likelihood, the Governor General would then ask Scheer whether he could create a government, citing the need to avoid two elections in quick succession. Scheer would, on paper, have more challenges, since the NDP says it will not work with him under any circumstances. This leaves the separatist Bloc Quebecois, which seeks independence for the predominantly French-speaking province of Quebec. Scheer has said he would not strike a deal with them, which would leave him running a minority government.

The best example of how long the process could take comes from the 2017 election in the Canadian province of British Columbia, where the gap between election day and the creation of a new government stretched out to 52 days. That election used the same rule book as the federal vote.