The invention discloses an electric vehicle online energy consumption prediction method and system, and the method comprises the steps: loading vehicle type information, and obtaining the average hundred-kilometer energy consumption P0 of a vehicle type, and the energy consumption being energy consumption of a standard driving style, a standard road condition and non-high-temperature or low-temperature weather; calculating an energy consumption correction coefficient ke; acquiring driving information of a preset number of vehicles of the same vehicle type which are driven on the current driving road section, classifying the vehicles according to the personal driving style, the congestion degree and the weather recorded after driving to the destination, averaging the actual energy consumption in each class, and further converting the average hundred-kilometer energy consumption of the road section to obtain the ratio of the average hundred-kilometer energy consumption to the standard hundred-kilometer energy consumption P0, namely ke in different styles, congestion degrees and weathers; and calculating and updating the current hundred-kilometer energy consumption P and the driving range E of the vehicle in real time in each execution period, wherein P is equal to keP0, E is equal to 100 Q.C/P, Q is the current battery capacity percentage, and C is the total energy of the batteryof the vehicle. Therefore, the vehicle type in a traditional algorithm is considered, the driving behavior is additionally considered, and the energy consumption prediction is more accurate.