Carpenter (2-7) picked up his first victory since May 10. He allowed one run and five hits to end a string of seven successive starts without a win. Carpenter struck out seven and walked one.
St. Louis won for the first time since three-time NL MVP Albert Pujols fractured his left forearm on Sunday. The Cardinals managed just two runs and 11 hits during the first two games without Pujols, who is out 4 to 6 weeks.
Philadelphia starter Roy Oswalt (4-6) left after two innings due to tightness in his lower back. He gave up four runs and five hits in his shortest start since a two-inning outing in a 9-7 loss to Atlanta on September 10, 2009.
The Phillies, who were looking to sweep the three-game series, closed out a six-game road trip at 3-3.
Carpenter entered the game with the 11th-lowest run support among NL starters at 3.38 runs per game. His teammates scored three times in the second and once in the third to give him an early 5-0 cushion.
Carpenter retired 10 of the first 11 hitters. He gave up three successive singles in the sixth, including a run-scoring hit by Ryan Howard, with two outs.
Jay hit his fifth homer of the season, a 422-foot shot to right off Oswalt to give the Cardinals a 1-0 lead. Berkman capped off a six-run outburst in the eighth with a three-run shot, his 18th of the season.
Colby Rasmus, Skip Schumaker and rookie catcher Tony Cruz opened the second with successive singles to push the lead to 2-0. Carpenter added a sacrifice bunt before Ryan Theriot ripped a two-run single to make it 4-0.
Cruz added a run-scoring single in the sixth. He finished 2 for 3 with the first two RBIs of his career.
Matt Holliday drove in two runs with a bases-loaded single in the eighth off reliever Danys Baez, who gave up six runs in the inning.
Carlos Ruiz hit a two-out homer in the ninth for Philadelphia.
NOTES: The Phillies fell to 19-17 on the road and remain one of five teams with winning records away from home. ... Holliday broke out of an 0-for-10 skid with a third-inning double. ... Carpenter is 6-2 in his career against Philadelphia. ... Berkman has 54 RBI. He had 58 all of last season.