How to calculate battery profit