There are different ways to calculate the electric potential energy stored in a capacitor.
Among these forms we have:
Form 1:
U = (CV ^ 2) / 2
Form 2:
U = (Q ^ 2) / 2C
Form 3:
U = (QV) / 2
Where,
Q: load
C: capacitance
V: voltage.
Answer:
U = (CV ^ 2) / 2
U = (Q ^ 2) / 2C
U = (QV) / 2