To determine the energy stored in a capacitor, we use the formula for the energy stored in a capacitor, which is derived from the basic principles of capacitance and electric potential energy.
Therefore, the correct formula for the energy stored in a capacitor of capacity C and potential V is \frac{CV^2}{2}.