Capacitor Energy Calculator
Check this capacitor energy calculator to find the energy and electric charge values stored in a capacitor.
The formula
E = ½CV² for a capacitor, ½LI² for an inductor
The square, and the missing half
A capacitor stores ½CV² and an inductor ½LI². Both go as the square, so for a capacitor the voltage rating matters more than the capacitance: doubling the working voltage quadruples the energy, while doubling the capacitance only doubles it.
The factor of a half has a physical reason. The charge Q = CV went in against a voltage that started at zero and rose linearly, so the average voltage the charge was pushed against was V/2 — hence ½QV, which is ½CV². The same argument explains why charging through a resistor is only 50% efficient.
Capacitors store very little energy compared with batteries — a large electrolytic holds a small fraction of a watt-hour. Their value is power density rather than energy density: they can absorb and release that energy in microseconds.
Inductors have the dual hazard. Their energy lives in the magnetic field and depends on current, so interrupting that current forces the field to collapse and generates whatever voltage is needed to keep the current flowing — often hundreds of volts from a 12 V circuit. That is why any inductive load switched by a transistor needs a flyback diode.