I just happend to come by a similar project to what Im doing, and apparantly it should be more like this:

1/2CV^2

Where C is the capacitans in Farads, and V is the voltage in Volts.