According to the information given by Valve in meet the Heavy cinematic, the Heavy’s minigun fires “200$ custom tool cartridges at 10000 rounds per minute”.

From this we can easily calculate rounds fired per second, which totals in 10000/60 = 166,6666667… ~ 167 rounds per second. Multiply that with the given cost of 200$ per cartridge and the 12 seconds he fires we get 167*12*200 = 400,800$.

So yes, the minigun does cost 400,000$ to fire for 12 seconds and yes, the Heavy does eat ass like an absolute monster.