Fox’s “Gotham” wrapped its first season with improved ratings on Monday, a night that saw NBC remain on top despite a season low from “The Voice” while CBS got a boost from its David Letterman special. And in latenight, a visit from President Obama lifted Letterman’s “Late Show” to its top overnight score since 2012 .

In Nielsen’s metered-market overnights, “The Late Show with David Letterman” did a 3.5 household rating/9 share — up nearly 50% from last Monday’s 2.4 household rating — to finish ahead of NBC’s “Tonight Show Starring Jimmy Fallon” (2.5/6) and ABC’s “Jimmy Kimmel Live” (2.2/6). This was the top overnight for “Late Show” since September 2012, when another Obama appearance averaged a 4.0/10. “Tonight Show” still led comfortably in adults 18-49, averaging a 1.1 rating to a 0.7 for both “Late Show” and “Kimmel,” according to Nielsen’s 25 markets with Local People Meters.

Looking at primetime, according to preliminary national estimates from Nielsen, “Gotham” averaged a 1.7 rating/6 share in adults 18-49 and 4.9 million viewers overall — up 13% (0.2) from last week for the show’s best score since it did a 2.0 on the final Monday before the start of Daylight Saving Time in early March. It ranked third for its hour in 18-49 and first in all key male demos. Though the Batman prequel cooled since its hot start last fall, it will finish the season as the net’s second biggest new series behind only “Empire” and figures to again anchor Fox’s Monday lineup next season.

“The Following” closed out the night for Fox (1.1/3 in 18-49, 3.3 million viewers overall), down a tick from last week.

At CBS, “2 Broke Girls” was again on the low side (1.6/6 in 18-49, 6.4 million viewers overall) but was able to match last week’s score while “Mike & Molly” (1.5/5 in 18-49, 6.7 million viewers overall) declined 12% (0.2) week to week to its season low. Following a special repeat of “The Big Bang Theory” at 9 (1.5/5 in 18-49, 7.1 million viewers overall), the special “David Letterman: A Life in Television” averaged a 1.5/5 in 18-49 and 8.1 million viewers overall — a 15% improvement over the 1.3 that the net delivered in the same 90-minute window a week ago with “Stalker” and “NCIS: Los Angeles.” It led its time period in 18-49 and 25-54 (2.2/6).

NBC’s “The Voice” (2.3/7 in 18-49, 9.7 million viewers overall) was again the night’s No. 1 show in demos but it was down 12% (0.3) to a Monday season low; its previous Monday low of the television season came with its fall edition’s penultimate episode last December (2.5). The net went from first to third among the major networks at 10 p.m. with “The Night Shift” (1.3/4 in 18-49, 5.6 million viewers overall), though the medical drama was able to hold at last week’s number.

ABC’s “Dancing With the Stars” (1.9/6 in 18-49, 12.2 million viewers overall) also hit a season low, down a tenth from last week but good enough for second place in demos from 8 to 10; in total viewers, it again was easily the night’s No. 1 show. And closing the night, “Castle” (1.4/4 in 18-49, 8.4 million viewers overall) held steady; like “Night Shift,” it may have benefited from the lack of CBS drama competition in the hour.

CW’s “The Originals” (0.5/2 in 18-49, 1.1 million viewers overall) held at last week’s number while “Jane the Virgin” was up (0.5/1 in 18-49, 1.0 million viewers overall), at least in the prelims.

Preliminary 18-49 averages for the night: NBC, 2.0/6; ABC, 1.7/6; CBS, 1.5/5; Fox, 1.4/5; CW, 0.5/2.

In total viewers: ABC, 11.0 million; NBC, 8.4 million; CBS, 7.4 million; Fox, 4.1 million; CW, 1.1 million.