Peña Nieto of the Institutional Revolutionary Party, or PRI, was ahead of runner-up Andres Manuel Lopez Obrador by 6.6% of the vote, an outcome in line with preliminary results and a quick count.
Lopez Obrador has vowed to challenge the results, accusing the PRI of vote-buying, and said that he would take his complaints through the legal system. He did not immediately comment following the announcement of the official count.
For his part, Peña Nieto told CNN that "I am president by the majority decision of the Mexicans."
If Lopez Obrador, who was the candidate for a leftist coalition, continues his challenge, the process could stretch out for months.
In the 2006 presidential vote, election authorities said the former Mexico City mayor narrowly lost to Felipe Calderon. Lopez Obrador claimed election fraud and never conceded, referring to himself as "the legitimate president of Mexico."
His supporters protested nationwide. In Mexico City, they staged sit-ins and blockades.
Officials have called this election the most transparent in Mexico's history. It was the first election in which scanned copies of district-by-district election returns were posted on the Internet.
But accusations have arisen of electoral manipulation by the PRI.
The party, which was in power for 71 years before being voted out in 2000, was known for being corrupt and authoritarian.
Its apparent victory last weekend would mark a triumphant return after 12 years of rule by the right-wing National Action Party, known by the acronym PAN.
Opponents of the PRI say they have video and photo evidence of the party buying votes through thousands of cards that could be redeemed for products at a chain of supermarkets.
Mexican election regulators said they are investigating the allegations related to the gift cards.