Statistical mechanics of constant-potential molecular simulations yields a new fluctuation–dissipation relation for the differential capacitance.