The Constitution provides that the outgoing President can only leave office after the swearing-in of a successor.
There is the worst-case scenario the president could continue being in office until May 2, 2023, if the presidential elections would be followed by presidential race run-offs and petitions as well.
However, according to strict timeliness provided for in the Constitution, President Kenyatta could leave office by September 3, if the August 9 presidential election is not contested at the Supreme Court.
This would be similar to the 2013 scenario, when Uhuru was declared validly elected and an election petition challenging his victory thrown out.
He was then inaugurated on April 9, 2013, slightly a month after the March 4 election date.
Then Cord presidential candidate Raila Odinga had challenged Uhuru's election.
Should the election also register a resounding first-round win, complete with the required 50%+1 threshold, then President Kenyatta could exit the stage a month after the August 9 polls.
The legal timeliness project that after the Tuesday election, the electoral commission must announce and declare the final presidential results by August 16.
This, according to the Constitution, would be seven days after the election.
In case candidates would dispute the presidential results, then they will have seven days to file petitions at the Supreme Court, which will run all the way to August 23.
The apex court will then take 14 days to hear and determine the presidential petitions. This could go up to September 6 because of the submissions window of seven days provided under the Supreme Court guidelines.
Should the Supreme Court dismiss the petition and uphold the presidential election, then President Kenyatta would exit office upon the swearing in of his successor on September 13.
However, the Supreme Court might go the 2017 way and annul the presidential election, ordering a repeat poll within 60 days, which will fall on November 3.
In 2017, the Supreme Court found the presidential election null and void due to massive illegalities and irregularities following a legal showdown.
The final results of the repeat poll will be announced by the IEBC on November 7. In case there will be no presidential petition, the next president will then take oath of office on November 29.
The Constitution, requires that one shall be declared president-elect if the candidate garners more than half of the votes cast in an election and at least 25 per cent of the votes cast in half of the counties.
This provision presents another scenario where a fresh presidential election might be ordered within 30 days if no candidate meets this threshold in Tuesday's presidential election.
However, a string of petitions at the Supreme court and subsequent run offs could take the country to the worst-case scenario.
After the repeat poll on November 7 followed by a successive supreme court petition, then President Kenyatta could be in office longer.
This is in case the November 7 repeat polls, there are projections that there will be no clear winner with none of the candidates garnering 50 per cent plus one votes required for a first round win.
There will then be a run-off that would be held on December 28.
Should there be a supreme court challenge on this one, a judgement would be delivered on January 23.
A fresh poll will be held on March 24 and results possibly announced within seven days.
Then there is anticipated another petition filed on April 5 but the apex court will uphold the verdict on April 19.
This would pave the way for the president-elect to be sworn into office on May 2.
University of Nairobi lecturer Herman Manyora recently argued such a scenario playing out in Kenya is remote as presidential elections are not easy to overturn.
He says the courts the world over avoid getting entangled in such political disputes as they consider it interference in the sovereign will of the people.
"Overturning presidential elections is not a daily cup of tea, notwithstanding the grounds cited,” Manyora wrote in the Nation.
The dates may vary based on IEBC declaration of presidential results.
While the law obligates the commission to announce the final results within seven days, it also opens a window for it to declare the results anytime once the leading candidate opens an unassailable lead.
“WATCH: The latest videos from the Star”