1. Growth rates directly influence individual fitness and constrain the flow of energy within food webs. Determining what factors alter the energetic cost of growth is therefore fundamental to ecological and evolutionary models. 2. Here, we used theory to derive predictions about how the cost of growth varies over ontogeny and with temperature. We tested these predictions by measuring resting oxygen consumption and growth rates of zebrafish (Danio rerio) at four temperature treatments (20˚C, 26˚C, 29˚C, 32˚C). We calibrated oxygen consumption for ATP production by measuring the efficiency of mitochondria (P/O ratios) at the end of the experiment. 3. We show that, when compared to growth rates, rates of resting oxygen consumption exhibited a significantly higher temperature dependence and significantly lower mass scaling. P/O ratios varied substantially among individuals, but did not account for the observed difference in temperature dependence between rates. Consequently, the cost of growth was significantly higher at earlier ontogenetic stages, and it increased twofold between 20˚C and 32˚C. Temperature systematically decreased the size of adults between 26˚C and 32˚C. 4. To the best of our knowledge, our study represents the first attempt to characterise how the cost of growth varies over ontogeny and across temperatures in a model vertebrate. Rising temperatures will substantially alter the structure of ecosystems and the distribution of biomass in food webs because they drive a decline in the average size of individuals, and because higher costs of growth lead to inefficient energy transfer between trophic levels.