Former President Barack Obama shared his secrets on how he was able to remain calm and level-headed under immense pressure throughout his presidency while speaking at a tech conference this week.

The 44th President of the United States told attendees in Salt Lake City, Utah on Wednesday that there some truth to his nickname “no drama Obama,” despite admitting he would still be ridden with fear over making a mistake.

“I have an even temperament and I don’t get too high and I don’t get too low, but that doesn’t mean that throughout the presidency and throughout my professional career that there weren’t times when I was constrained by, ‘Man I don’t want to screw this up. I don’t want to let people down,” Mr Obama said at a conference hosted by software company Qualtrics. “I don’t want to be seen as having made made a mistake or having failed’.”

It wasn’t until his second term did Mr Obama experienced a “shedding of fear” that he said helped him perform better.

“There’s no doubt by the time I was in my second term I was a better president than I was in my first term and it did not have to do with analysis or policy,” he added. “It had to do with what comes with any career — whether it’s sports or teaching or you name it — you get enough reps, enough repetition and familiarity with the nature of the problems that you start being focused on the task and not how-are-you-doing-on-the-task and the self-consciousness that comes with that.”

Barack Obama's best moments in the White House Show all 11 1 /11 Barack Obama's best moments in the White House Barack Obama's best moments in the White House May 19, 2009 “The President was leaving the State Floor after an event and found Sasha in the elevator ready to head upstairs to the private residence. He decided to ride upstairs with her before returning to the Oval Office,” Peter Souza Barack Obama's best moments in the White House Oct. 26, 2012 President Barack Obama pretends to be caught in Spider-Man's web as he greets the son of a White House staffer in the Outer Oval Office Peter Souza Barack Obama's best moments in the White House “A National Security staffer, Carlton Philadelphia, brought his family to the Oval Office for a farewell photo with President Obama. Carlton’s son, Jacob, softly told the President he had just gotten a haircut like President Obama, and asked if he could feel the President’s head to see if it felt the same as his.” Peter Souza Barack Obama's best moments in the White House March 21, 2010 The President, Vice President and senior staff applaud after watching on television the House vote on H.R. 4872 for health care reform, in the Roosevelt Room of the White House Peter Souza Barack Obama's best moments in the White House Dec. 3, 2009 President Barack Obama fist-bumps custodian Lawrence Lipscomb in the Eisenhower Executive Office Building following the opening session of the White House Forum on Jobs and Economic Growth Peter Souza Barack Obama's best moments in the White House Sept. 22, 2015 "The Obama family and Biden family greet Pope Francis as he arrives in the United States for the first time at Joint Base Andrews," Sept. 22, 2015. Peter Souza Barack Obama's best moments in the White House Feb. 21, 2014 President Barack Obama and Vice President Joe Biden participate in a "Let's Move!" video taping on the Colonnade of the White House, Feb. 21, 2014 Peter Souza Barack Obama's best moments in the White House Feb. 18, 2016 President Barack Obama watches First Lady Michelle Obama dance with 106-Year-Old Virginia McLaurin in the Blue Room of the White House prior to a reception celebrating African American History Month, Feb. 18, 2016 Peter Souza Barack Obama's best moments in the White House Jan. 21, 2013 "The President and First Lady wave to supporters as they ride in the inaugural parade. I had asked the President if I could ride in the presidential limousine and the President joked, 'But Michelle and I were planning to make out," Jan. 21, 2013. Peter Souza Barack Obama's best moments in the White House Barack Obama and former First Lady Michelle Obama share a private moment in a freight elevator at an Inaugural Ball, January 2009 all pics: Pete Souza Barack Obama's best moments in the White House Barack Obama rests his hand on the bible that President Lincoln used for his swear-in, being held by his wife Michelle Obama as he is sworn in as the 44th President of the United States of America Rex

The former president said his change of attitude with focusing on the tasks at hand, rather than being fixated at the performance of it, helped him make strides when it came to the Iran nuclear deal and the Paris Climate accords.

He was able to overcome his anxiety that made him fixated over making possible mistakes by learning how to become more comfortable with tackling the large complex problems.

Rather than being obsessed with poll numbers or commentary from pundits, he would focus on “advancing this vision that I have and I hope the country will share, that we create a better country.”

He did this by not letting the press distract him. Mr Obama said he does not look at social media comments or watch pundits on cable news including the commentary insulting and praising him.

“If people were complementary, people assume you know more than you did,” the former president said before noting that an inflated ego can be just as detrimental as low self-esteem.

Support free-thinking journalism and attend Independent events

Mr Obama viewed the public commentary about him “unhelpful” and “not useful to me in doing my job or solving a problem, but designed to feed possible anxiety.”

But what happens if the former president does make a mistake?