The successful fabrication of several freeform optical elements by ultraprecision micromilling is presented in this article. We discuss in detail the generation of the tool paths using different variations of a computer-aided manufacturing (CAM) process. Following a classical CAM approach, a reflective beam shaper was fabricated. The approach is based on a solid model calculated by optical design software. As no analytical description of the surface is needed, this procedure is the most general solution for the programming of the tool paths. A second approach is based on the same design data. But instead of a solid model, a higher order polynomial was fitted to the data using computational methods. Taking advantage of the direct programming capabilities of state-of-the-art computerized numerical control units, the mathematics to calculate the polynomial based tool paths on-the-fly during the machining process are implemented in a highly flexible CNC code. As another example for this programming method, the fabrication of a biconic lens from a closed analytical description directly derived from the optical design is shown. We provide details about the different programming methods and the fabrication processes as well as the results of characterizations concerning surface quality and shape accuracy of the freeform optical elements.© (2011) COPYRIGHT Society of Photo-Optical Instrumentation Engineers (SPIE). Downloading of the abstract is permitted for personal use only.