In this study, we consider fuel cell-powered electric trucks (FCETs) as an alternative to conventional medium- and heavy-duty vehicles. FCETs use a battery combined with onboard hydrogen storage for energy storage. The additional battery provides regenerative braking and better fuel economy, but it will also increase the initial cost of the vehicle. Heavier reliance on stored hydrogen might be cheaper initially, but operational costs will be higher because hydrogen is more expensive than electricity. Achieving the right tradeoff between these power and energy choices is necessary to reduce the ownership cost of the vehicle. This paper develops an optimum component sizing algorithm for FCETs. The truck vehicle model was developed in Autonomie, a platform for modelling vehicle energy consumption and performance. The algorithm optimizes component sizes to minimize overall ownership cost, while ensuring that the FCET matches or exceeds the performance and cargo capacity of a conventional vehicle. Class 4 delivery truck and class 8 linehaul trucks are shown as examples. We estimate the ownership cost for various hydrogen costs, powertrain components, ownership periods, and annual vehicle miles travelled.