Calculating battery power and rounding gas prices