An iterative algorithm is proposed for determining the optimal chassis design of an electric vehicle, given a path and a reference time. The proposed algorithm balances the capacity of the battery pack and the dynamic properties of the chassis, seeking to optimize the tradeoff between the mass of the vehicle, its energy consumption, and the travel time. The design variables of the chassis include geometrical and inertial values, as well as the characteristics of the powertrain. The optimization is constrained by the slopes, curves, grip, and posted speeds of the different sections of the track. Particular service constraints are also considered, such as limiting accelerations due to passenger comfort or cargo safety. This methodology is applicable to any vehicle whose route and travel time are known in advance, such as delivery vehicles, buses, and race cars, and has been validated using telemetry data from an internal combustion rear-wheel drive race car designed for hill climb competitions. The implementation of the proposed methodology allows to reduce the weight of the battery pack by up to 20%, compared to traditional design methods.