Preheat your oven to 350°F (175°C). Grease two 8-inch round cake pans with butter or cooking spray, then line the bottoms with parchment paper circles for easy removal.
For vanilla cake: In a medium bowl, whisk together the flour, baking powder, baking soda, and salt. For chocolate cake: Whisk together the flour, cocoa powder, baking powder, baking soda, and salt.
3 cups all-purpose flour, 2 cups granulated sugar, 1 tablespoon baking powder, 1/2 teaspoon baking soda, 1/2 teaspoon salt, 2 3/4 cups all-purpose flour, 2 cups granulated sugar, 3/4 cup cocoa powder, 2 teaspoons baking powder, 1 1/2 teaspoons baking soda, 1 teaspoon salt
In the bowl of your stand mixer fitted with the paddle attachment, beat the butter and sugar together on medium-high speed until light and fluffy, about 3-4 minutes.
2 cups granulated sugar, 1 cup unsalted butter, 2 cups granulated sugar, 1 cup unsalted butter
Add the eggs one at a time, beating well after each addition. Then, add the vanilla extract and oil, mixing until well incorporated.
4 large eggs, 2 tablespoons vanilla extract, 1/4 cup vegetable oil, 4 large eggs, 1 tablespoon vanilla extract, 1/4 cup vegetable oil
Gradually add the dry ingredient mixture to the butter mixture in three parts, alternating with the buttermilk, beginning and ending with the dry ingredients. Mix only until just combined after each addition to avoid overmixing.
1 cup buttermilk, 1 cup buttermilk
For the chocolate version only: Slowly pour in the hot coffee or water and mix until smooth. The batter will be somewhat thin, which is normal for a moist chocolate cake.
1/2 cup hot coffee or hot water
Divide the batter evenly between the prepared cake pans, smoothing the tops with a spatula.
Bake in the preheated oven for 30-35 minutes, or until a toothpick inserted into the center comes out clean or with a few moist crumbs.
Allow the cakes to cool in the pans for 10 minutes, then run a knife around the edges and turn them out onto a cooling rack to cool completely.