I don't really know how to do that since I get the batteries for free.
I don't like looking at how much I spend on my bike because it's quite a bit. Chains, tires, food, washing, clothes and miscellaneous tid bits here and there it really adds up. Fortunately for me it's not about the money.
but yes it is something to look at at years end.