Mr Buhari has won seven of Nigeria's 36 states, while his rival Atiku Abubakar took two states and the capital Abuja.
As results came in, Mr Abubakar's People's Democratic Party (PDP) alleged that there had been irregularities in the vote.
Party chair Uche Secondus called the count "incorrect and unacceptable".
He said there had been an "attempt by the government and other agencies to manipulate the result", but did not give any evidence.
The EU, US and African Union have all expressed concern about delays and logistical problems with voting on Saturday, but no independent observers have suggested fraud.
Mr Buhari, a member of the governing All Progressives Congress (APC) party, is seeking re-election but faces a strong challenge from Mr Abubakar.
Each party says the other is working with the Independent National Electoral Commission (Inec) to influence the vote, which was initially scheduled for 16 February but delayed at the last minute.
Mr Buhari has promised to build on his accomplishments in office so far, while Mr Abubakar, a business tycoon, has accused the president of wasting his term.
Whoever wins in Africa's most populous nation and largest economy faces a range of problems including power shortages, corruption, security threats, and an economic slowdown.
What are the allegations?
Final results are not expected until later in the week. But Mr Secondus has criticised the initial tallies, saying the government was using "impeachments, manipulation, incarceration" to influence the outcome.
In turn, the federal government accused the PDP of trying to "scuttle the polls" and prompt a constitutional crisis.
The initial vote was postponed early on Saturday 16 February, five hours before polls were due to open. Voters were also choosing members of the House of Representatives and Senate.
Most of the country was calm but there were reports of attacks by the Boko Haram Islamist militant group in the north, and voter intimidation and attempts to steal ballot boxes, especially in the southern states of Rivers, Lagos, and Anambra.
A coalition of civil society groups reported that a total of 16 people were killed around the country - fewer than in previous elections.
Two people were arrested in Lagos after a group of armed young men attacked voters, eyewitness Ralph Onodike told the BBC.
"What they were saying was that if you were not [voting for the ruling party] APC, you'll be attacked," he said.
How does the election work?
The candidate with the most votes is declared the winner in the first round, provided that person gains at least 25% of the votes in two-thirds of Nigeria's states. There are 73 registered candidates, but Mr Buhari and Mr Abubakar have dominated the presidential election.
Both are from the mainly Muslim north of the country and both are in their 70s, while more than half of Nigeria's 84 million registered voters are under 35.
Main presidential candidates
MUHAMMADU BUHARI (APC)
Embattled and determined leader
ATIKU ABUBAKAR (PDP)
What are the main issues?
Nigeria is Africa's largest oil producer but corruption and a failure to invest the proceeds from the industry have hampered development.
A slow recovery from a recession in 2016 means there are not enough jobs for the large number of young people joining the employment market. About a quarter of the working age population is unemployed.
Election in numbers
73 million have voters' cards
51% of the electorate under the age of 35
73 registered presidential candidates
120,000 polling stations
Mr Buhari has quelled a militant Islamist rebellion in Nigeria's north-east, but Boko Haram remains active. There has also been an upsurge in violence in the country's Middle Belt as traditional herders and more settled farmers have clashed.
Until 1999 Nigeria was governed by either short-lived civilian administrations or military rulers. But this year marks 20 years since the return of democracy.
Mr Buhari was elected in 2015 - the first time an opposition candidate had defeated an incumbent to become president.