Preheat oven to 350°F (175°C). Grease and flour two 9-inch (23 cm) round cake pans.
In a large mixing bowl, combine flour, sugar, cocoa powder, baking powder, baking soda, salt, and espresso powder (if using).
Add in the buttermilk, coffee or hot water, oil, eggs, and vanilla extract. Mix until just combined.
Divide the batter evenly between the prepared pans.
Note: This recipe can also be made into cupcakes by filling muffin cups 2/3 full.