We present the SWIRE Photometric Redshift Catalogue 1025119 redshifts of unprecedented reliability and of accuracy comparable with or better than previous work. Our methodology is based on fixed galaxy and quasi-stellar object templates applied to data at 0.36-4.5um, and on a set of four infrared emission templates fitted to infrared excess data at 3.6-170um. The galaxy templates are initially empirical, but are given greater physical validity by fitting star formation histories to them, which also allows us to estimate stellar masses.