Prep your pan: Preheat oven to 350°F. Grease and flour your bundt pan or two 9-inch round cake pans.
Mix dry ingredients: In a medium bowl, whisk flour, baking powder, baking soda, and salt. Set aside.
Cream butter and sugar: Beat butter and sugar with an electric mixer until light and fluffy (3-4 minutes).
Add eggs: Beat in eggs one at a time.
Alternate wet and dry: Add dry ingredients in three batches, alternating with buttermilk, beginning and ending with flour mixture. Mix until combined.
Divide batter: Transfer 1/3 of the batter to a separate bowl.
Make chocolate batter: Mix cocoa powder, milk, and espresso powder to form a smooth paste. Add to the separated batter and mix.
Create marble effect: Spoon vanilla and chocolate batters alternately into the pan. Use a butter knife to swirl gently through the batter.
Bake: For bundt pan, bake 50-60 minutes. For round pans, bake 30-35 minutes. Check with a toothpick.
Cool properly: Cool in the pan for 15 minutes, then invert onto a wire rack to cool completely.