I agree, the costs tend to be higher than one imagines... I did this sort of calculation recently too, and then looked how expensive are the derailleurs vs IGH, to see if i can cut the costs somehow and the results provided quite some thoughts on this topic.
I don't want to highjack the thread (no debates on IGH vs direct drivetrain please), but here is at least one sink where the money goes for many of us... (it's based on the assumption that every year one replaces cassette (or a single cog) and two chains. Not considering the replacement of worn IGH or derailleurs once in a while). Costs are given in Euros, values found in some popular online shops. I am surprised that I could buy quite some extra fancy gear if i sticked to IGH's instead of what i've been using till now. Crazy.