The invention relates to a device and a method for the determination of the position of a catheter in a vascular system (8). In this, the measured positions (r1, r2) of two magnetic localizers at the tip of a catheter are displaced by correction vectors (k1, k2) while optimizing a quality dimension. The quality dimension includes a component taking account both of the deviation of the measured positions (r1, r2) from the vascular layout and of the deviation of the associated orientation (r2&minusr1) from the orientation of the vascular layout according to a vascular map. In addition, the quality dimension may include components which evaluate the measured shape of the catheter compared to the vascular map. An additional correction step can further ensure that the corrected positions (r1&prime, r2&Prime) correspond to the preset fixed distance (d) of the localizers (4, 5).