Roland Ratsiraka, nephew of ex-president Didier Ratsiraka, was third with 10.14 per cent.
The 57-year-old Ravalomanana, who first came to power after elections in 2001, said: "I am very happy. This confirms our confidence with Madagascans and the international community.
"We will continue on our path. I am optimistic about the future of Madagascar."
Solofo Razoarimihaja, president of Ravalomanana's TIM (I Love Madagascar) party and the deputy speaker of parliament, said: "This is a good result for the president and democracy in Madagascar.
"Just as we said during the campaigns, we will continue with the efforts in the coming years."
Ravalomana is expected to be sworn in within the first two weeks of January.
The constitutional court needed an extra two weeks to finalise its results, because of the time taken to collect ballot boxes from the more remote regions of the world's fourth largest island, which is roughly 1,600km long.
Ravalomana's rivals had lodged complaints with the court claiming voting irregularites, but election monitors said the polls were fair.
The court rejected ruled that there were no irregularities regarding election returns of the opposition candidates.
The country's last presidential elections in 2001 ended in violence and chaos when Roland Ratsiraka refused to concede defeat to Ravalomanana.
"This is a good result for the president and democracy in Madagascar"
Solofo Razoarimihaja, president of Ravalomanana's TIM party and deputy parliament speaker
The impasse split the island in two - with two capitals, two governments, and a divided army - until Ravalomanana was officially proclaimed president in May 2002.
Ravalomana has outlined an economic recovery plan that seeks to reduce poverty to 50 per cent and shore growth by between eight to 10 percent annually by 2012.
The opposition had accused Ravalomanana of not doing enough to reverse poverty on the island, which ranks 143 out of 177 on the UN Human Development Index.
Nearly 70 per cent of Madagascar's 17 million population live in poverty. But the World Bank says infrastructure, health and education have all improved since Ravalomanana came to power in 2002.