Ingredients

1 stick unsalted butter, melted and cooled, plus more, softened, for pan 

1 1/3 cups unbleached all-purpose flour 

1/2 cup Dutch-process cocoa powder, sifted 

2 teaspoons baking powder 

1 teaspoon kosher salt (we use Diamond Crystal) 

4 large eggs, room temperature 

1 1/2 cups granulated sugar 

1 tablespoon red food coloring 

2 teaspoons pure vanilla paste or extract 

1 cup sour cream, room temperature 

1 pound cream cheese, room temperature 

1 stick unsalted butter, softened 

2 cups confectioners' sugar, sifted 

1 teaspoon pure vanilla extract or paste 

Preparation

Cake: Preheat oven to 350°F. Brush a 9-by-13-inch or 8-by-12-inch baking pan with butter. Line with parchment, leaving a 2-inch overhang on long sides. Butter parchment.

Whisk together flour, cocoa, baking powder, and salt. Combine eggs and granulated sugar in the bowl of a mixer fitted with the whisk attachment. Beat on high speed until thick and pale, about 4 minutes. Add flour mixture; beat just to combine. Add butter, food coloring, and vanilla; beat to combine. Add sour cream; beat until smooth.

Scrape batter into prepared pan, smoothing top with a spatula. Bake until top springs back when lightly touched and a tester inserted in center comes out clean, 30 to 35 minutes (for 9-by-13-inch) or about 40 minutes (for 8-by-12).

Let cool in pan on a wire rack 10 minutes. Using parchment overhangs, lift out of pan; let cool completely on rack. (Cake can be made to this point and stored at room temperature, wrapped in plastic, up to 1 day.)

Frosting: Beat together cream cheese, butter, and confectioners’ sugar on medium-high speed until smooth and fluffy, about 5 minutes. Beat in vanilla. Spread frosting over cake. Frosted cake is best the day it’s assembled, but can be refrigerated, wrapped in plastic, up to 1 day. Return to room temperature before serving.