The present invention refers to a method for determining foam during spin cycle of operation in a drum-type washing machine (99). In the technique, a foam level is detected (110) by a foam sensor (10), based on sensing of pressure of a detergent solution tub (4). Simultaneously, a rotational speed of the drive motor (5) is detected (120). The foam level and the rotational speed of the drive motor (5) are detected (110,120) for a given time instance. Thereafter, a threshold value corresponding to the rotational speed of the drive motor (5) is determined (130). Finally, the foam level detected (110) by the foam sensor (10) is compared (140) to the threshold value. The foam is determined to be present in the washing machine (99) if the foam level detected by the foam sensor (10) is equal to or greater than the threshold value.