One of the main goals of organic and molecular electronics is to relate the performance and electronic function of devices to the chemical structure and intermolecular interactions of the organic component inside them, which can take the form of an organic thin film, a self-assembled monolayer or a single molecule1,2,3,4,5,6,7. This goal is difficult to achieve because organic and molecular electronic devices are complex physical–organic systems that consist of at least two electrodes, an organic component and two (different) organic/inorganic interfaces. Singling out the contribution of each of these components remains challenging. So far, strong π–π interactions have mainly been considered for the rational design and optimization of the performances of organic electronic devices8,9,10, and weaker intermolecular interactions have largely been ignored. Here, we show experimentally that subtle changes in the intermolecular van der Waals interactions in the active component of a molecular diode dramatically impact the performance of the device. In particular, we observe an odd–even effect as the number of alkyl units is varied in a ferrocene–alkanethiolate self-assembled monolayer. As a result of a more favourable van der Waals interaction, junctions made from an odd number of alkyl units have a lower packing energy (by ∼0.4–0.6 kcal mol–1), rectify currents 10 times more efficiently, give a 10% higher yield in working devices, and can be made two to three times more reproducibly than junctions made from an even number of alkyl units.