The top quark mass was measured in the channels tt → lepton+jets and tt → dilepton (lepton = e, μ) based on ATLAS data recorded in 2011. The data were taken at the LHC with a proton–proton centre-of-mass energy of √s = 7 TeV and correspond to an integrated luminosity of 4.6 fb−1. The tt → lepton+jets analysis uses a three-dimensional template technique which determines the top quark mass together with a global jet energy scale factor (JSF), and a relative b-to-light-jet energy scale factor (bJSF), where the terms b-jets and light-jets refer to jets originating from b-quarks and u, d, c, s-quarks or gluons, respectively. The analysis of the tt → dilepton channel exploits a one-dimensional template method using the mℓb observable, defined as the average invariant mass of the two lepton+b-jet pairs in each event. The top quark mass is measured to be 172.33 ± 0.75(stat + JSF + bJSF) ± 1.02(syst) GeV, and 173.79 ± 0.54(stat) ± 1.30(syst) GeV in the tt → lepton+jets and tt → dilepton channels, respectively. The combination of the two results yields mtop = 172.99 ± 0.48(stat) ± 0.78(syst) GeV, with a total uncertainty of 0.91 GeV.