This study investigates the potential of improving the energy efficiency and reducing the lifecycle costs of electric city buses with multispeed gearboxes. A two-speed dual clutch gearbox and a continuously variable transmission were studied and compared to a reference fixed gear ratio powertrain. A novel two-level optimization model was introduced. The top level involves an exhaustive search algorithm and quasi-static vehicle dynamic model for optimizing the two-speed gearbox gear ratios, utilizing efficiency maps for the electric motor and the inverter. The second level is an integer programming model, which finds an optimal gear shifting policy subject to constraints on hysteresis and gear shifting induced losses. The model was applied with a standard driving cycle and additionally with three measured cycles acquired from a prototype battery electric city bus operating on a daily schedule on a suburban route in Espoo, Finland. The results showed that a two-speed gearbox reduced energy consumption by 2–3.2%, depending on the driving cycle characteristics. On the other hand, the continuously variable transmission was found to increase consumption by 1.9–4.0% due to large losses of the belt mechanism. It was concluded that the two-speed gearbox is a cost-effective investment for electric city buses characterized by operation profiles with frequent acceleration and braking events.