But gaps persist, he told Howard University's Class of 2016, citing racism and inequality.
In his commencement speech at one of the nation's leading historically black schools, Obama said there were no black CEOs of Fortune 500 companies and few black judges when he received a bachelor's degree from Columbia University in 1983.
"A lot of folks didn't even think blacks had the tools to be a quarterback," Obama said. "When I was a graduate, the main black hero on TV was Mr. T."
"I'm not saying gaps do not persist. Obviously, they do," Obama said. "Racism persists, inequality persists."
More From This Section
He called on Howard's 2,300 graduates to step up and take on the work of closing those gaps.
"America needs you to gladly, happily take up that work ... So enjoy the party, because you're going to be busy," Obama said.
He cited income inequality, an issue in the presidential campaign to elect his successor in November, as well as disparities in unemployment, pay and criminal justice.
"So make no mistake Class of 2016. You've got plenty of work to do," said Obama, who was awarded an honorary doctor of science degree. "But as complicated and intractable as these challenges may see, the truth is your generation is better position than any before you to meet those challenges."
"America is a better place today than it was when I graduated from college," Obama said, adding "by almost every measure." He also said the country "also happens to be better off than when I took office, but that's a longer story."
The 54-year-old president also told graduates that most of them were just starting high school when he was first elected to the White House.
"I used to joke about being old. Now I realize I'm old. It's not a joke anymore.