Adjust oven rack to lower-middle position and preheat to 350℉ (175℃).
Grease and flour a cake pan or line a muffin pan with baking cup liners.
In a large bowl, mix the sugar, flour, cocoa, baking soda, baking powder, and salt.
Add eggs, buttermilk, coffee, oil, and vanilla extract. Mix with a spatula or wooden spoon for about 2 minutes (the batter will be thinner than usual). Pour batter evenly into the prepared cake or muffin pans.
Bake at 350℉ (175℃) for 50-60 minutes for a cake or 15 minutes for cupcakes. A wooden pick inserted in the center will come out clean. Remove from the pan and cool completely on a rack.
Optional frost with cream cheese frosting or ganache. See notes.
Notes
Cream cheese frosting: In a large bowl, cream 8 ounces unsalted butter and 8 ounces cream cheese (softened) with an electric mixer. Whisk in 2 cups powdered sugar, a cup at a time, until smooth and creamy. Stir in 1 teaspoon vanilla extract and frost the cake or cupcakes.
Feel free to adjust the sugar to your tastes. I used 1½ cups, and it was still sweet enough.
The coffee is what makes this cake black, but you can leave it out if you don't like it. Or you could replace it with decaf or a non-coffee substitute.
Please remember that the nutritional information is a rough estimate and can vary significantly based on the products used in the recipe.