A capacitor is a device that stores electrical potential energy by accumulating equal and opposite charges on two conductive plates separated by an insulator. Capacitance is defined as the ratio of stored charge to potential difference and depends on the size, shape, and material between the plates of the capacitor. When a capacitor is connected to a voltage source, charges flow to the plates until the potential difference equals the source voltage. The stored energy increases with larger capacitance and higher voltage according to the equation 1/2CV^2.