The invention relates to a method for detecting an occlusion in an infusion line (200) during an infusion process comprising the steps of receiving a periodically measured value of a force (F) that is applied by a pumping device (1) to push a liquid through the infusion line (200) and that is indicative of the pressure (P) in the infusion line (200), and subtracting from the measured force value (F) a frictional force component (F0), that is indicative of a true frictional force, for correcting the measured force value (F) by the true frictional force. The method is characterized in that the value of the frictional force component (F0) is periodically updated throughout the infusion process by applying an equation that comprises a term that takes into account the measured force (F).