ALTHOUGH the liquid-gas phase equilibria of simple fluids have been studied extensively since the seminal work of van der Waals, the properties of fluids with more complex molecular structures, such as polymers, present a less tractable problem both theoretically and experimentally. The phase behaviour of hydrocarbons is of particular importance for the petrochemical industry. But despite significant experimental and theoretical efforts, the phase diagrams of the straight-chain alkanes longer than decane (C10) are known only partially, and even qualitative aspects such as the chain-length dependence of the critical properties are poorly understood. Until recently it was considered impossible to estimate the critical properties of such complex fluids using computer simulations. Here we report Monte Carlo simulations of the phase diagrams of alkanes with unbranched carbon chains as long as C48, up to the vicinity of the liquid-vapour critical points. Our calculations show that, in contrast to the traditional view, the critical density of the long-chain alkanes decreases rather than increases with carbon number. This work indicates that simulations can be used as an 'engineering tool' to estimate properties that are not readily accessible experimentally.