The present invention generally relates to implantable medical devices, such as pacemakers, and, in particular, to a method and an implantable medical device capable of detecting the presence of noise caused by external noise sources. Voltages and/or impedances are measured over one or several electrode configurations. Based on the measured voltages and/or impedances, noise parameters are calculated, which are compared with reference values to detect the presence of noise. In another aspect of the invention, at least two different electrode configurations with different noise pick-up areas are used in the measurement. Relations between the noise parameters of the at least two vectors are calculated and compared with reference relations to detect the presence of noise.