In the past, gears have largely been manufactured by means of dedicated gear manufacturing machines and tools. These are difficult and expensive to manufacture and maintain, and offer low flexibility and an inability to make anything other than gears. This thesis attempts to offer a method by which internal and external cylindrical involute gears can be machined on a conventional five-axis milling center used for other manufacturing processes, in conjunction with low cost commonly used cylindrical end mills. The algorithms are based on a parametric vectorial model of the involute profile, and the involute flanks are machined in accordance with the generation principle. A machine with a C axis stacked on a B axis is used. Specifically, the rotary table (C axis) of a five axis milling machine is used to rotate the work piece, while the tool is caused to travel within a plane tangent to the base circle. For helical gears, the B axis is rotated to account for the helix angle. External and internal, spur and helical gears have been machined and measured, and flanks with form deviations less than 5 $\mu m$ have been produced.