I also did a gear wheel long time ago, mab be it will be usefull. The expression list is in danish, but M is the module and Tandantal is number of teeth.
-regards Larshttp://files.engineering.com/getfile.aspx?folder=bafa0d9e-789d-4a25-982b-3cc5e7f52d44&file=tand.prt