In the run-off vote on December 19, Rajoelina scored 55 percent of the ballot and Marc Ravalomanana won 44 percent, according to the final results.
Ravalomanana lodged complaints over alleged irregularities with the Constitutional Court, which will announce the official winner on Tuesday.
Last week riot police in the Indian Ocean island used tear gas to break up one of several protests by thousands of Ravalomanana supporters in the capital Antananarivo.
The two rivals, both former presidents, were banned from running in the 2013 election as part of an agreement to end recurring crises that have rocked Madagascar since it gained independence from France in 1960.
The 2018 two-round election was beset by allegations of fraud from both sides, and a contested result may raise the risk of renewed political instability.
European Union and African Union election observers said they had not seen evidence of fraud.
Fiercely personal duel
Rajoelina and Ravalomanana have been locked in a fiercely personal duel for power, coming first and second in the preliminary election in November.
Last month, Ravalomanana told AFP at his campaign headquarters that he suspected "massive fraud".
Ravalomanana, 69, was first elected president in 2002 but was forced to resign seven years later by violent demonstrations supported by Rajoelina, then the mayor of Antananarivo.
Rajoelina, now 44, was installed by the army and ruled until 2014. He is a former events planner and successful entrepreneur with slick communication skills.
Both candidates spent lavishly on campaigning, with promises and handouts distributed liberally to voters, who are among the poorest in Africa.
Madagascar is well known for its vanilla and precious redwood but is one of the world's poorest nations, with 76 percent of people living in extreme poverty.
The island, which is also famed for its unique wildlife, is dependent on foreign aid and burdened by political friction.
Outgoing president Hery Rajaonarimampianina was eliminated in the first round after collecting less than nine percent of the vote.
His attempts to change the electoral laws this year backfired, sparking nearly three months of sometimes violent protests.
The demonstrators forced Rajaonarimampianina to accept a "consensus" government tasked with organising the election.