Carpenter was born in Bennington, Vermont, where he attended Bennington High School.
He began his performing career as a magician and an actor on Broadway, beginning with David Merrick's first production, Bright Boy, in 1944, followed by co-starring appearances in Three to Make Ready with Ray Bolger, John Murray Anderson's Almanac and Hotel Paradiso with Bert Lahr and Angela Lansbury.
He was a featured player on the very early television program Campus Hoopla, which was produced by NBC, via WNBT in New York City, and which aired from 1946-47.
Carpenter was brought to Hollywood in 1949 by independent producer Louis de Rochemont to play the boy friend in Lost Boundaries. De Rochemont later cast him again, in The Whistle at Eaton Falls (1951). He signed with Metro-Goldwyn-Mayer in 1950, where he made eight films in three years: Father of the Bride, Three Little Words, Summer Stock, Two Weeks With Love, Vengeance Valley, Fearless Fagan, Sky Full of Moon and Take the High Ground!.
He gained fame when teamed in 1950 with Debbie Reynolds in Three Little Words and Two Weeks with Love. In a guest sequence in Three Little Words, they perform “I Wanna Be Loved by You” as vaudeville players Dan Healy and Helen Kane, with Reynolds dubbed by Kane. In Two Weeks with Love, where they have featured roles, their duet "Aba Daba Honeymoon" was the first soundtrack recording to become a top-of-the-chart gold record, reaching number three on the Billboard charts.
After 1953, he exited films for stage, TV and radio work. Among his television appearances, he played Gilbert Burton, the recipient of $1,000,000 in a 1959 episode of The Millionaire and co-starred with Ann Sothern in the 1954 TV production of Kurt Weill's Lady in the Dark, which he also recorded for RCA Victor Records. In 1963, he played defendant Peter Brent in the Perry Mason episode "The Case of the Lover's Leap".
He returned to film in 1959 for Up Periscope for Warner Bros. and, much later, Cauliflower Cupids (1970) and Some of My Best Friends Are... (1971), as the character "Miss Untouchable".
Later stage appearances include Hello, Dolly!, opposite Mary Martin (which toured Vietnam during the war and was filmed as a one-hour NBC-TV special), The Boys in the Band, Dylan, Crazy For You, and the City Center revival of Kander and Ebb's 70, Girls, 70.
Carpenter composed the songs "Christmas Eve", recorded by Billy Eckstine, "Cabin in the Woods" and "Ev'ry Other Day", which he recorded for MGM Records and sang on screen in The Whistle at Eaton Falls. In 1943 he wrote the words and melody of the song "Can We Forget". His other song compositions include "I Wouldn't Mind", "A Little Love", and "Come Away". He also wrote a musical, Northern Boulevard, which was produced in New York City by actress Rosetta LeNoire.
Carpenter wrote material for Debbie Reynolds, Kaye Ballard, Marlene Dietrich and Hermione Gingold, and also scripts for films and television.
Carpenter was a successful mystery novelist in the 1970s and 1980s. One of his books, Deadhead, was turned into a Broadway musical. Other books he wrote include Games Murderers Play, Cat Got Your Tongue?, Only Her Hairdresser Knew, Sleight of Deadly Hand, The Peabody Experience, and Stumped.
His memoir, The Absolute Joy of Work, was published in 2016.
In 2012, he received a lifetime achievement award from the Hollywood film organization Cinecon, which was presented to him in person by his former costar Debbie Reynolds.