An economist and former central bank governor, Mahamudu Bawumia, was sworn in as vice president.
President John Mahama had appealed for calm and told his supporters he would respect the outcome of the vote whether he won or lost.
The New Patriotic Party said its candidate, Nana Akufo-Addo, had taken 53.5% of the vote so far - against 44.8% for President John Mahama.
“The elections have generally been peaceful, far more peaceful than anticipated,” Seidu Alidu, an analyst.
Ghana is held up a beacon of democracy in West Africa with a track record of peaceful elections.
Attacks on politicians are rare in Ghana but another leading member of the NPP, Adam Mahama, died in May last year after an acid attack
Ghana’s Akufo-Addo has contested the presidential vote twice before, compared to Buhari’s three times before he was successful.