The range of operations of electric vehicles (EVs) is a critical aspect that may affect the user's attitude toward them. For manned EVs, range anxiety is still perceived as a major issue and recent surveys have shown that one-third of potential European users are deterred by this problem when considering the move to an EV. A similar consideration applies to aerial EVs for commercial use, where a careful planning of the flying range is essential not only to guarantee the service but also to avoid the loss of the EVs due to charge depletion during the flight. Therefore, route planning for EVs for different purposes (range estimation, route optimization) and/or application scenarios (terrestrial, aerial EVs) is an essential element to foster the acceptance of EVs as a replacement of traditional vehicles. One essential element to enable such accurate planning is an accurate model of the actual power consumption. While very elaborate models for the electrical motors of EVs do exist, the motor power does not perfectly match the power drawn from the battery because of battery non-idealities. In this paper, we propose a general methodology that allows to predict and/or optimize the operation range of EVs, by allowing different accuracy/complexity tradeoffs for the models describing the route, the vehicle, and the battery, and taking into account the decoupling between motor and battery power. We demonstrate our method on two use cases. The first one is a traditional driving range prediction for a terrestrial EV; the second one concerns an unmanned aerial vehicle, for which the methodology will be used to determine the energy-optimal flying speed for a set of parcel delivery tasks.