Methods, systems, and computer-readable media are disclosed herein for virtually planning a cranial guided surgery in a subject. These include, in some embodiments, generating a first data set based on input data obtained of a reference structure having a defined fixed relation to a bone structure of said subject and generating a second data set based on input data obtained of a master structure for a surgical template, where the master structure has a defined relation to said reference structure. Further, in some embodiments, a third data set for production of said surgical can be generated based on the first data send and the second data set, wherein the relation of said reference structure to said master structure is preserved.