It has been a couple of years since I've done the cost analysis (and prices for raw chems have only increased) but, here in the US, commercially packaged D76 is definitely cheaper than mixing it yourself (comparing the gallon size package). If you buy the smaller quart sized bags (are these even available anymore?) then, the commercial package is way more expensive.

Essentially, the cost difference comes down to the cost of Sodium Sulfite, distilled water and shipping. Here are a few assumptions:

1) The gallon size package of D76 is available locally (no shipping costs).
2) use tap water with commercially packaged D76, there is no need for distilled in this case.
3) mix home brew in distilled water (adds $1.29 per gallon)