  The capacitance of an arbitrarily shaped object is calculated with the same
second-kind integral equation method used for computing static and dynamic
polarizabilities. The capacitance is simply the dielectric permittivity
multiplied by the area of the object and divided by the squared norm of the
Neumann-Poincar\'{e} operator eigenfunction corresponding to the largest
eigenvalue. The norm of this eigenfunction varies slowly with shape thus
enabling the definition of two scale-invariant shape factors and perturbative
calculations of capacitance. The result is extended to a special class of
capacitors in which the electrodes are the equipotential surfaces generated by
the equilibrium charge on the object. This extention allows analytical
expressions of capacitance for confocal spheroidal capacitors and finite
cylinders. Moreover, a second order formula for thin constant-thickness
capacitors is given with direct applications for capacitance of membranes in
living cells and of supercapacitors. For axisymmetric geometries a fast and
accurate numerical method is provided.
