President Obama’s visit to “The Late Show With David Letterman” on Tuesday propelled the CBS latenight show to its best overnight rating in more than 2 1/2 years.

According to Nielsen estimates for 56 of the country’s largest markets, Tuesday’s hour averaged a 4.0 household rating/10 share — up 60% from the program’s television year-to-date Tuesday average (2.5/6) and up 67% from the Monday-Friday average during the 2011-12 television year (2.4/6).

The show hasn’t recorded a higher overnight score since a February 2010 episode featuring Jennifer Garner and Sports Illustrated swimsuit model Brooklyn Decker (4.3/10).

Obama’s visit drew especially well in Gotham on CBS-owned station WCBS, where “Late Show” drew 495,000 viewers and a 2.6 rating in adults 25-54, making it the most-watched “Letterman” telecast in New York since January 2008 and highest in the demo since October 2006.

In addition to New York, “Late Show” also led its time period in total viewers on CBS-owned stations in Los Angeles, Chicago, Philadelphia, San Francisco, Boston, Minneapolis, Sacramento, Pittsburgh and Baltimore.

National viewership estimates won’t be available for a few days.