Abdel Fattah el-Sisi, the former army chief who last year toppled Egypt's first freely elected leader, the Islamist Mohamed Mursi, is expected to be sworn in as president later this week after unofficial results showed he won a landslide victory in last month's election.
Iran welcomed the 2011 uprising that led to the downfall of autocratic President Hosni Mubarak, and considered it an "Islamic awakening" given that it was followed by Islamist rule. When the army ousted Mursi from power in July last year, Tehran criticised the move, drawing a hostile response from Cairo.
"He was invited in both capacities as president of Iran and president of the Non-Aligned Movement," Egypt's presidential spokesman Ehab Badawi told Reuters, but said that so far there had been no response.
Iran's semi-official Fars news agency said that Egypt's representative in Tehran met with Rouhani's chief of staff, Mohammad Nahavandian, and handed him the official invitation from interim President Adly Mansour.
Under Mursi, ties between the two countries seemed to improve, with the then Iranian president Mahmoud Ahmadinejad becoming the first Iranian leader to visit Egypt in more than three decades. He called for a strategic alliance with Egypt and offered Cairo a loan to ease a deepening economic crisis.
Rouhani, a relative moderate who took power in 2013, has pledged to improve relations with Tehran's regional neighbours.
Iran and Egypt cut formal diplomatic relations in 1980 after Tehran was angered by Egypt's admission of the deposed Shah of Iran and Egypt's recognition of Israel.
One persistent obstacle to improving relations has been Tehran naming a street after the Egyptian Islamist militant who led the 1981 assassination of President Anwar Sadat after he signed a peace treaty with Israel.
The official results of Egypt's presidential elections are due to be announced later this evening.