This paper describes a method for registering and visualizing in real-time the results of transcranial magnetic stimulations (TMS) in physical space on the corresponding anatomical locations in MR images of the brain. The method proceeds in three main steps. First, the patient scalp is digitized in physical space with a magnetic-field digitizer, following a specific digitization pattern. Second, a registration process minimizes the mean square distance between those points and a segmented scalp surface extracted from the magnetic resonance image. Following this registration, the physician can follow the change in coil position in real-time through the visualization interface and adjust the coil position to the desired anatomical location. Third, amplitude of motor evoked potentials can be projected onto the segmented brain in order to create functional brain maps. The registration has subpixel accuracy in a study with simulated data, while we obtain a point to surface root-mean-square error of 1.17+/-0.38 mm in a 24 subject study.