The incumbent leader, 78, had faced stiff competition in the 21 May election, including from his deputy.
The result was announced on Monday after an injunction ordered by the country’s high court was lifted.
Challenger Lazarus Chakwera, who finished in second place, had sought to delay the announcement because of concerns over voting irregularities.
The head of the Malawi Electoral Commission (MEC), Jane Ansah, appealed for calm ahead of the announcement.
What were the results?
The MEC say President Mutharika, who heads the Democratic Progressive Party (DPP), gained a narrow victory by about 159,000 votes.
Mr Chakwera, from the Malawi Congress Party (MCP), came close behind with about 35.4% of the vote. He had also placed as runner-up five years ago.
President Mutharika’s deputy, Saulos Chilima, finished in third place – winning just over 20% of the ballot.
With high levels of national poverty, the economy and corruption were key election issues.
The vote was seen as one of the most unpredictable the country had seen.