Aim This cross-sectional study into children and young adults with cerebral palsy (CP) aimed to assess the association of gross energy cost (EC), net EC and net nondimensional (NN) EC during walking with age and body height, compared to typically developing (TD) peers. Method Data was collected in 128 participants with CP (mean age 11y9mo; GMFCS I,n = 48; II,n = 56; III, n = 24) and in 63 TD peers (mean age 12y5mo). Energy cost was assessed by measuring the oxygen consumption during over-ground walking at comfortable speed. Outcome measures derived from the assessment included the gross and net EC, and NN EC. Differences between the groups in the association between gross, net and NN EC with age and body height, were investigated with regression analyses and interaction effects (p < 0.05). Results Interaction effects for age and body height by group were not significant, indicating similar associations for gross, net and NN EC with age or body height among groups. The models showed a significant decline for gross, net and NN EC with increasing age per year (respectively −0.201 J kg−1·m−1; −0.073 J kg−1 m−1; −0.007) and body height per cm (respectively −0.057 J kg−1 m−1; −0.021 J kg−1 m−1; −0.002). Interpretation Despite higher gross and net EC values for CP compared to TD participants, similar declines in EC outcomes can be expected with growth for participants aged 4–22 years with CP. All energy cost outcomes showed a decline with growth, indicating that correcting for this decline is required when evaluating changes in gross EC, and, to a lesser extent, in net and NN EC in response to treatment or from natural course over time.