The research on electrochemical double layer capacitors (EDLC), also known as supercapacitors or ultracapacitors, is quickly expanding because their power delivery performance fills the gap between dielectric capacitors and traditional batteries. However, many fundamental questions, such as the relations between the pore size of carbon electrodes, ion size of the electrolyte, and the capacitance have not yet been fully answered. We show that the pore size leading to the maximum double-layer capacitance of a TiC-derived carbon electrode in a solvent-free ethyl-methylimmidazolium-bis(trifluoro-methane-sulfonyl)imide (EMI-TFSI) ionic liquid is roughly equal to the ion size (approximately 0.7 nm). The capacitance values of TiC-CDC produced at 500 degrees C are more than 160 F/g and 85 F/cm(3) at 60 degrees C, while standard activated carbons with larger pores and a broader pore size distribution present capacitance values lower than 100 F/g and 50 F/cm(3) in ionic liquids. A significant drop in capacitance has been observed in pores that were larger or smaller than the ion size by just an angstrom, suggesting that the pore size must be tuned with sub-angstrom accuracy when selecting a carbon/ion couple. This work suggests a general approach to EDLC design leading to the maximum energy density, which has been now proved for both solvated organic salts and solvent-free liquid electrolytes.