The President, the highest official in Iran following the Leader, is elected for a four-year term by an absolute majority of votes polled by the voters.
The first presidential election was held in the Islamic Republic of Iran on January 25, 1980, when the country’s Islamic Revolution took place a year earlier.
Back in 1980, Abolhasan Bani-Sadr won Iran’s first presidential election with 70 percent of the vote. After serving in the office for 17 months, he was dismissed from the position in 1981 by Imam Khomeini, the founder of the Islamic Revolution, due to incompetence.

Bani-Sadr, along with Mojahedin-e Khalq (MKO terrorist group) ringleader Massoud Rajavi, fled to France on July 29, 1981.
Second presidential election in Iran
After the victory of the Islamic Revolution, Mohammad Ali Rajaee was appointed as the Minister of Education.

Later he was elected to the Islamic Consultative Assembly. In 1980, he was appointed as the prime minister of the Islamic Republic of Iran by a majority vote of the Parliament.
In the same year, he was elected president by the people but was martyred when the terrorist MKO bombed his office on August 30, 1981.
Third and fourth presidential elections
Ayatollah Seyyed Ali Khamenei was elected president on October 2, 1981, and reelected in 1985.
In the third presidential election, Ayatollah Khamenei won more than 16 million votes out of 16.8 million votes.
Ayatollah Khamenei won over 12 million of the total of more than 14.2 million votes in the fourth presidential election.

He has made several trips to foreign countries in these 8 years. His speech in 1987 at the UN General Assembly against arrogant powers is regarded as a milestone.
landmark events of Ayatollah Khamenei’s second term are the adoption of UN Security Council resolution 598, which took place on July 17, 1988, and the departure of Imam Khomeini on June 4, 1989.
Following this event, Ayatollah Khamenei was selected by the Assembly of Experts as the Leader of the Islamic Revolution. This occurred less than 2 months before the fifth presidential election.
Fifth and sixth presidential elections in Iran

Akbar Hashemi Rafsanjani was elected the fourth Iranian president in the election, which was held on July 28, 1989,
Rafsanjani received 15.5 million out of 16.4 million votes.
He was also selected as the Speaker of the Iranian parliament, better known as Majlis, for three terms.
In his second term, Rafsanjani won 10.5 million votes out of 16.7 million votes.
Seventh and eighth presidential elections in Iran

On May 23, 1997, the seventh presidential election was held in Iran.
During the race, Mohammad Khatami received over 20.7 million votes out of more than 29.7 million votes.  
In the consecutive year, Khatami won the eighth presidential election on June 8, 2001, with more than 21.6 million votes out of over 28.8 million votes.
Ninth and tenth elections in Iran

The ninth presidential election was held in two phases in 2005. In the runoff election, Mahmoud Ahmadinejad could gain over 17.2 million votes out of over 27.9 million votes.
Ahmadinejad won the second term with 24.5 million votes out of over 39 million votes.
Eleventh and twelfth elections in Iran

The 11th presidential election was held on June 14, 2013, during which Hassan Rouhani was elected as the seventh president of the Islamic Republic of Iran with more than 18.6 million votes, out of a total of over 36.7 million votes.
Iran’s 12th presidential election was held on May 19, 2017, during which Rouhani was elected with more than 23.5 million votes.
Thirteenth election in Iran

The 13th Iranian presidential election was held on June 18, 2021, during which Seyyed Ebrahim Raeisi received 62.9% of the vote with over 17.9 million votes and was elected as the President of the Islamic Republic of Iran.
The Late Founder of the Islamic Revolution Imam Khomeini confirmed three presidents and Ayatollah Khamenei has confirmed four others so far. Raeisi is the fourth president, who has been confirmed by the Leader.
The various confirmations of presidents are proof of the fact that the Islamic Republic is based on Islamic laws and the votes of the people. 
In all confirmation texts recited by Imam Khomeini and Ayatollah Khamenei, the expression “confirming people’s vote” comes before “appointment as President.”
MNA