The use of individual molecules as functional electronic devices was proposed in 1974 (ref. 1). Since then, advances in the field of nanotechnology have led to the fabrication of various molecule devices and devices based on monolayer arrays of molecules. Single molecule devices are expected to have interesting electronic properties, but devices based on an array of molecules are easier to fabricate and could potentially be more reliable. However, most of the previous work on array-based devices focused on two-terminal structures: demonstrating, for example, negative differential resistance, rectifiers, and re-configurable switching. It has also been proposed that diode switches containing only a few two-terminal molecules could be used to implement simple molecular electronic computer logic circuits. However, three-terminal devices, that is, transistors, could offer several advantages for logic operations compared to two-terminal switches, the most important of which is 'gain'-the ability to modulate the conductance. Here, we demonstrate gain for electronic transport perpendicular to a single molecular layer ( approximately 10-20 A) by using a third gate electrode. Our experiments with field-effect transistors based on self-assembled monolayers demonstrate conductance modulation of more than five orders of magnitude. In addition, inverter circuits have been prepared that show a gain as high as six. The fabrication of monolayer transistors and inverters might represent an important step towards molecular-scale electronics.