We have studied the capacitance between two parallel plates enclosing a quantum confined system and its dependence on the applied voltage. The concepts of capacitance and differential capacitance are discussed together with their applicability to systems characterized by single.electron tunneling. We determine the tunneling thresholds by means of a formalism based on the minimization of the system free energy and we retrieve, as a special case, Luryi's quantum capacitance formula. We apply our method to the study of an idealized system made up of a number of quantum dots with random size distributed according to a gaussian. Results are shown for different choices of the position of the dots between the plates and of the voltage span applied to perform the measurement of the differential capacitance.