Preheat the oven to 180°c/Gas 4. Grease an 8x4" dome cake tin with margarine and a light dusting of flour and set aside.
Beat together the margarine and sugar with an electric whisk until pale and fluffy.
In a separate bowl, lightly beat the eggs with the vanilla extract. In another bowl add the flour and baking powder.
Add a ¼ of the eggs to the butter and stir in, then fold in ¼ of the flour and stir until combined and then repeat until all the eggs and flour are mixed together and smooth.
Stir in the sifted cocoa powder and mix until all combined.
Spoon the mixture into the cake tin and bake for approx 50mins until a skewer inserted into the middle comes out clean.