The British prime minister is also trying to get in a few words on Brexit during a one-on-one with the German chancellor, Angela Merkel.
Germany's main center-left party faces pressure to decide on a challenger to Angela Merkel in next year's election after the chancellor announced she will seek a fourth term.
"There's something about the solemn responsibilities of that office. that forces you to focus, that demands seriousness", Mr Obama said at a press conference after talks with his host, German Chancellor Angela Merkel, on Thursday.
They wistfully said farewell on Thursday during a joint news conference.
By standing again, Merkel could end up matching the 16 years in office of her former mentor, Helmut Kohl.
The leader, often named the most powerful woman in the world, told reporters in Berlin on Sunday evening that she would seek re-election in 2017.
"Chancellor Merkel is perhaps the only leader left among our closest allies that was there when I arrived", he said of the chancellor who has been in office for 11 years. "She is, as it were, the anti-Trump", party ally Stanislaw Tillich, premier of the state of Saxony, told the RND newspaper group, adding she stood for reliability and predictability.
Merkel, commenting on her growing influence in the European Union and globally, said: "One person alone can never solve everything, we're only strong together".
Speaking in Berlin, Obama also praised as an "outstanding" worldwide partner his host Angela Merkel, seen by many as a new standard bearer of liberal democracy as the world tensely awaits how Trump will reshape the global order. However, her decision past year to open Germany's borders to around 900,000 migrants, mostly from war zones in the Middle East, angered many voters at home and dented her ratings.
It also revived the fortunes of the right-wing populist Alternative for Germany party (AfD), which has harnessed widespread anxiety about migration. "I will do what is my duty as the German chancellor, namely on the one hand to serve the people in Germany, but that includes for me to work for European unity and European success".
Merkel's policy of allowing nearly 1 million refugees to enter Germany previous year eroded support for the chancellor and her party while fueling backing for the anti-immigration Alternative for Germany.
President Barack Obama has urged his successor Donald Trump to stand up to Russia if it deviates from USA "values and global norms", and not simply "cut some deals" with Russian leader Vladimir Putin when convenient.
Trump s shock election win has sparked fears of drastic policy upheavals as he has challenged a near 70-year-old security shield for U.S. allies under North Atlantic Treaty Organisation and vowed to withdraw from hard-fought deals on the climate and Iran s nuclear programme.
Obama, seeking to allay fears of major policy shifts under President-elect Donald Trump, urged his European counterparts to continue "seeking solutions to common challenges with the incoming USA administration on the basis of the core values that define the United States and Europe as open democracies".
On his farewell visit to Berlin, Obama praised Merkel Thursday as an "outstanding partner" and urged Germans to "appreciate" her.
In September, after a heavy defeat for the CDU in a Berlin state election, a humbled Merkel surprised the country by saying she wished she could turn the clock back on the migrant crisis, though she stopped short of saying her policy was a mistake.
A poll released Friday showed that Merkel's conservatives would draw 32 per cent of the vote if the election were held this weekend, AFP reported.
The AfD scored 12 percent in the poll by independent opinion research institute Infratest dimap.
It is still unclear who will carry the SPD's banner into the race, with party leader Sigmar Gabriel potentially facing a challenge from European Parliament President Martin Schulz.