Power line interference ("hum noise") is a common source of noise in recorded biological data. It has a highly constant frequency with harmonics and little variation in amplitude and wave shape. In contrast to stochastic noise it is phasic, i.e., the phase relation remains constant across long intervals. In digital recordings, the measurement frequency is typically very close to a 5 multiple of the hum frequency (50 or 60 Hz). Common filters introduce various kinds of distortions and errors. The here proposed subtraction method makes use of the specific properties of power line hum. For this, it computes a moving estimate of the hum noise by taking the periodic median of the high-pass filtered signal. The resulting periodic median subtraction (PMS) filter reliably 10 removes hum of any harmonic composition, even if the ground frequency is lacking. The filter is completely free of border artifacts. It does not introduce distortions, even if around sharp transients such as in force plate recordings of jumping. The filter is validated on recorded and artificial data. The errors are quantified. The results also show that the errors of hum filters generally 15 increase with the high-frequency content of the data. Thus, the removal of hum from a force plate recording generally gives better results than from an EMG recoding. Compared to other filters, the errors of the PMS filter are generally lower than the best hum filters currently known.