Films of colloidal quantum dots (QDs) show great promise for application in optoelectronic devices. Great advances have been made in recent years in designing efficient QD solar cells and LEDs. A very important aspect in the design of devices based on QD films is the knowledge of their absolute energy levels. Unfortunately, reported energy levels vary markedly depending on the employed measurement technique and the environment of the sample. In this report, we determine absolute energy levels of QD films by electrochemical charge injection. The concomitant change in optical absorption of the film allows quantification of the number of charges in quantum-confined levels and thereby their energetic position. We show here that the size of voids in the QD films (<i>i.e.</i>, the space between the quantum dots) determines the amount of charges that may be injected into the films. This effect is attributed to size exclusion of countercharges from the electrolyte solution. Further, the energy of the QD levels depends on subtle changes in the QD film and the supporting electrolyte: the size of the cation and the QD ligand length. These nontrivial effects can be explained by the proximity of the cation to the QD surface and a concomitant lowering of the electrochemical potential. Our findings help explain the wide range of reported values for QD energy levels and redefine the limit of applicability of electrochemical measurements on QD films. Finally, the finding that the energy of QD levels depends on ligand length and counterion size may be exploited in optimized designs of QD sensitized solar cells