We describe the GALFORM semi-analytic model for calculating the formation and evolution of galaxies in hierarchical clustering cosmologies . It improves upon , and extends , the earlier scheme developed by Cole et al . ( [ 1994 ] ) . The model employs a new Monte-Carlo algorithm to follow the merging evolution of dark matter halos with arbitrary mass resolution . It incorporates realistic descriptions of the density profiles of dark matter halos and the gas they contain ; it follows the chemical evolution of gas and stars , and the associated production of dust ; and it includes a detailed calculation of the sizes of disks and spheroids . Wherever possible , our prescriptions for modelling individual physical processes are based on results of numerical simulations . They require a number of adjustable parameters which we fix by reference to a small subset of local galaxy data . This results in a fully specified model of galaxy formation which can be tested against other data . We apply our methods to the \Lambda CDM cosmology ( \Omega _ { 0 } = 0.3 , \Lambda _ { 0 } = 0.7 ) , and find good agreement with a wide range of properties of the local galaxy population : the B-band and K-band luminosity functions , the distribution of colours for the population as a whole , the ratio of ellipticals to spirals , the distribution of disk sizes , and the current cold gas content of disks . In spite of the overall success of the model , some interesting discrepancies remain : the colour-magnitude relation for ellipticals in clusters is significantly flatter than observed at bright magnitudes ( although the scatter is about right ) , and the model predicts galaxy circular velocities , at a given luminosity , that are about 30 % larger than is observed . It is unclear whether these discrepancies represent fundamental shortcomings of the model or whether they result from the various approximations and uncertainties inherent in the technique . Our more detailed methods do not change our earlier conclusion that just over half the stars in the universe are expected to have formed since z \la 1.5 .