“How I Met Your Mother” is going out with a bang. Not only did the cast of the CBS comedy appear on “Inside the Actors Studio” in the week before the show’s series finale, but they started singing.

Technically, it is only Neil Patrick Harris and Jason Segel who sing. But their rendition of “The Confrontation” from “Les Miserables” is enough for 20 such casts.

In case you had forgotten, there are a bunch of singers on “How I Met Your Mother.” Harris is especially known for roles in Broadway musicals, even if the role of Inspector Javert isn’t in his official resume. It might as well be after dueling so well with Segel’s Jean Valjean.

While the whole thing is both amazing and kind of ridiculous, the best part may come at the 1:20 mark when the two singers get so into their parts that Cobie Smulders has to get up and move.

The “How I Met Your Mother” series finale airs Monday, March 31 at 8 p.m. on CBS.

Posted by:Laurel Brown