Method for machining a tool by material removal, with the following steps: - performance of a three-dimensional measurement of the tool and production of a three-dimensional virtual tool model of the tool from the measurement data of the three-dimensional measurement, - provision of several tool datasets each with a reference contour of the tool and/or with at least one tool parameter corresponding to a key value of the tool, wherein a machining program is assigned to each tool dataset, - comparison of the three-dimensional virtual tool model with the respective reference contour, and/or comparison of a model parameter, which corresponds to a key value of the tool and is determined depending on the virtual tool model, with the respective tool parameter of a stored tool dataset, - selection of the tool dataset which corresponds to the three-dimensional virtual tool model and/or the at least one model parameter, or production and selection of a tool dataset which corresponds to the three-dimensional virtual tool model and/or the at least one model parameter, - production of a nominal tool contour by integration of a reference contour, determined from the tool dataset or contained in the tool dataset, into the three-dimensional virtual tool model under the boundary condition that the material removal is as small as possible, wherein the reference contour is integrated into the virtual tool model such that the reference contour is modified by rotation and/or displacement and/or scaling so as to give a modified reference contour (R*), wherein this modified reference contour (R*) is positioned inside the virtual tool model so that the longitudinal axes of the modified reference contour (R*) and of the virtual tool model coincide, and wherein the modified reference contour (R*) does not protrude from the virtual tool model at the regions of the tool to be machined, - machining of the tool by material removal to produce an actual tool contour corresponding to the nominal tool contour. - performance of a three-dimensional measurement of the tool and production of a three-dimensional virtual tool model of the tool from the measurement data of the three-dimensional measurement, - provision of several tool datasets each with a reference contour of the tool and/or with at least one tool parameter corresponding to a key value of the tool, wherein a machining program is assigned to each tool dataset, - comparison of the three-dimensional virtual tool model with the respective reference contour, and/or comparison of a model parameter, which corresponds to a key value of the tool and is determined depending on the virtual tool model, with the respective tool parameter of a stored tool dataset, - selection of the tool dataset which corresponds to the three-dimensional virtual tool model and/or the at least one model parameter, or production and selection of a tool dataset which corresponds to the three-dimensional virtual tool model and/or the at least one model parameter, - production of a nominal tool contour by integration of a reference contour, determined from the tool dataset or contained in the tool dataset, into the three-dimensional virtual tool model under the boundary condition that the material removal is as small as possible, wherein the reference contour is integrated into the virtual tool model such that the reference contour is modified by rotation and/or displacement and/or scaling so as to give a modified reference contour (R*), wherein this modified reference contour (R*) is positioned inside the virtual tool model so that the longitudinal axes of the modified reference contour (R*) and of the virtual tool model coincide, and wherein the modified reference contour (R*) does not protrude from the virtual tool model at the regions of the tool to be machined, - machining of the tool by material removal to produce an actual tool contour corresponding to the nominal tool contour.