In some cases, leading presidential candidates can tie in terms of votes. In this case, if none got more than 50 % of the votes cast, the elections will be repeated.
If you want to understand more about law relating presidential candidates, here is a summarized explanation.
(1) If only one candidate for President is nominated, that candidate shall be declared elected.
(2) If two or more candidates for President are nominated, an election shall be held in each constituency.
(3) In a presidential election–
(a) all persons registered as voters for the purposes of parliamentary elections are entitled to vote;
(b) the poll shall be taken by secret ballot on the day specified in Article 101 (1) at the time, in the places and in the manner prescribed under an Act of Parliament; and
(c) after counting the votes in the polling stations, the Independent Electoral and Boundaries Commission shall tally and verify the count and declare the result.
(4) A candidate shall be declared elected as President if the candidate receives–
(a) more than half of all the votes cast in the election; and
(b) at least twenty-five per cent of the votes cast in each of more than half of the counties.
(5) If no candidate is elected, a fresh election shall be held within thirty days after the previous election and in that fresh election the only candidates shall be–
(a) the candidate, or the candidates, who received the greatest number of votes; and
(b) the candidate, or the candidates, who received the second greatest number of votes.
(6) If more than one candidate receives the greatest number of votes, clause (5) (b) shall not apply and the only candidates in the fresh election shall be those contemplated in clause (5) (a).
(7) The candidate who receives the most votes in the fresh election shall be declared elected as President.
(8) A presidential election shall be cancelled and a new election held if–
(a) no person has been nominated as a candidate before the expiry of the period set for the delivery of nominations;
(b) a candidate for election as President or Deputy President dies on or before the scheduled election date; or
(c) a candidate who would have been entitled to be declared elected as President, dies before being declared elected as President.
(9) A new presidential election under clause (8) shall be held within sixty days after the date set for the previous presidential election.
(10) Within seven days after the presidential election, the chairperson of the Independent Electoral and Boundaries Commission shall–
(a) declare the result of the election; and
(b) deliver a written notification of the result to the Chief Justice and the incumbent President.