Reliable and accurate estimation of electric bus energy consumption is critical for electric bus operation and planning. But energy prediction for electric buses is challenging because of diversified driving cycles of transit services. We propose to establish a data-partition based artificial neural network model to predict energy consumption of electric buses at microscopic level and link level. The purpose of data partitioning is to separate data into charging and discharging modes and then develop most efficient prediction for each mode. We utilize a long-term transit operation and energy consumption monitoring dataset from Chattanooga, SC to train and test our neural network models. The microscopic model estimates energy consumption of electric bus at 1Hz frequency based on instantaneous driving and road environment data. The prediction errors of micro model ranges between 8% and 15% on various instantaneous power demand, vehicle specific power, bins. The link-level model is to predict average energy consumption rate based on aggregated traffic pattern parameters derived from instantaneous driving data at second level. The prediction errors of link-level model are around 15% on various average speed, temperature and road grade conditions. The validation results demonstrate our models’ capability to capture impacts of driving, meteorology and road grade on electric bus energy consumption at different temporal and spatial resolution.