Employers added more than 2 million jobs during 2017, making it a very good year for Donald Trump's first in office.

But it's not quite as good as Barack Obama's last year on the job.

Trump wasn't in office yet when the Labor Department collected the data used in January 2017 jobs report, so for the sake of comparison it makes sense to exclude the first month of the year. But in the remaining 11 monthly jobs reports, employers added 1.84 million jobs, according to the December jobs report released Friday. That compares to 2.09 million jobs added in Obama's last 11 months in office.

Even if you just look at full-year numbers, the 2.06 million jobs added in 2017 falls short of the 2.24 million jobs created in 2016, Obama's last full year in office.

Related: First-year presidential economies - From Carter to Trump

Of course the jobs numbers during Obama's first year were particularly bad, since he took office in the midst of the worst economic downturn since the Great Depression.

The economy lost 4.28 million jobs from February through December of 2009, as payrolls fell every month. Unemployment soared from 7.8% when in January 2009 to 10% in October of that year.

The jobs market was far healthier when Trump took office, with unemployment down to 4.8%. By the end of the year it fell to 4.1%, a 17-year low.

In fact the jobs market is so strong that employers are struggling to find and hire the qualified workers they want. Unfilled job openings are near record levels.

Related: Job market may be only thing hotter than the stock market

Trump has promised to be the greatest job creator president ever, although economists and historians question how much any president affects the jobs number. But it's clear businesses liked Trump's agenda of cutting regulation and cutting corporate income tax.

But a good economy in a president's first year is not guarantee of success.

Jimmy Carter had one of the best job records in his first year in office, with the economy adding 3.7 million jobs from February through December of 1977. By 1980, his final year in the White House, the economy was in recession and his bid for reelection was defeated.