Ahmadinejad told academics in a speech that elements inside Iran were pressing for compromise in the nuclear standoff with the West over fears the United States could launch a military strike.
"In some discussions I told them 'I am an engineer and I am examining the issue. They do not dare wage war against us and I base this on a double proof'," he said in the speech on Sunday, reported by the reformist Etemad Melli and Kargozaran newspapers.
"I tell them: 'I am an engineer and I am a master in calculation and tabulation.
"I draw up tables. For hours, I write out different hypotheses. I reject, I reason. I reason with planning and I make a conclusion. They cannot make problems for Iran.'"
Ahmadinejad has long expressed pride in his academic prowess. He holds a PhD on transport engineering and planning from Tehran's Science and Technology University and is the author several of scientific papers.
The deeply religious president said his second reason was: "I believe in what God says."
"God says that those who walk in the path of righteousness will be victorious. What reason can you have for believing God will not keep this promise."
Washington has never ruled out taking military action against Tehran, and its tone has sharpened again over the past week with President George W. Bush warning that Iran's nuclear programme could lead to a "nuclear holocaust."
Ahmadinejad said that "God willing" one day he would write his memoirs to put the record straight.
French President Nicolas Sarkozy has already warned that Iran risks being bombed if the nuclear crisis is not resolved. Ahmadinejad last week brushed off the comments which he said were due to his French counterpart's inexperience.