I've created a materials calculator for the trade skills in WoW using PHP and mySQL. Right now I've only added Alchemy, Blacksmithing, Mining and a bit of Engineering. I have ironed out most of the few bugs I've noticed while adding and viewing the recipes.
You can view the calculator at http://www.gamingparadox.com/matscalc/ It's fairly simple to use as all you do is select your trade skill and the recipe and enter the number of items you wish to produce. The trade skill and recipes now automatically change and you should only have to hit "Calculate!" when you change the number of items to produce.
If you notice any bugs or spelling/number mistakes or if you would like to help enter recipes into the database you can reach me at firstname.lastname@example.org or Thrane on Uther.