It’s official: Donald Trump has been good for Stephen Colbert.

A final tally of late-night numbers were released on Tuesday for the 2016-2017 TV season, confirming a stunning comeback for “The Late Show with Stephen Colbert.”

Colbert’s final average nightly viewership was 3.26 million — 80,000 ahead of the 3.18 million nightly total for “The Tonight Show Starring Jimmy Fallon,” according to Nielsen.

The left-wing, bespectacled talk-show host claimed his full-season victory after losing miserably in the 2015-2016 TV season, when he trailed Fallon’s “Tonight” by 870,000 viewers.

Indeed, Colbert mounted his impressive comeback after beginning the latest season with a 738,000-viewer deficit versus Fallon, closing it steadily as the election and its aftermath wore on, according to Nielsen.

Colbert’s victory over Fallon came as viewers flocked to Colbert’s “Late Show” for its cynical take on politics and nightly take-down of President Trump – including a vulgar rant last month that drew outrage but boosted ratings.

Fallon floundered, meanwhile, as he stuck to his usual mix of song, dance and amiable celebrity interviews — although many believe he never recovered after fawning over Trump and mussing his hair during a September show.

In terms of eyeball share, Colbert’s comeback was the product of a 12.4 percent viewership gain, versus a 15.6 percent loss for Fallon, according to Nielsen.

“Late Show’s” seasonal late-night crown in total viewers is the first for CBS since the 1994-1995 TV season.

Viewership numbers for the season, which stretched from Sept. 19, 2016, to May 24, 2017, include live viewing plus seven days of delayed playback.