NBC’s “Saturday Night Live” ended a transitional season — the show’s 39th — with average numbers for its finale hosted by Andy Samberg.

According to national estimates from Nielsen, Saturday’s telecast of “Saturday Night Live” averaged a 4.0 overnight household rating in the metered markets — above the previous week’s season low of 3.8 (with host Charlize Theron) and about average for its spring episodes. A year ago, the season finale with Ben Affleck and Kanye West did a 4.7.

In adults 18-49, “SNL” pulled a 2.1 rating, again up from the previous week’s season low (1.8) but down from last year’s 2.7.

“SNL” this season had to deal with the departures of longtime castmembers Fred Armisen, Bill Hader and Jason Sudeikis. Also, “Weekend Update” anchor Seth Meyers left midseason to take the reins of NBC’s “Late Night.”

NBC recently announced a 40th anniversary special in primetime for next February.