A steam trap 2 comprises an inlet 6 for receiving a flow of steam and condensate, and a collection chamber 4 to receive the steam and condensate and defining a collection volume. A valve 12 is provided in a wall of the collection chamber 4. A first sensor 8 determines the temperature of the steam at the inlet 6 and a second sensor 10 determines the temperature of the condensate in the collection volume. A controller 16 controls the valve to maintain a difference in the temperature of the steam at the inlet and the temperature of the condensate in the collection volume at a predefined subcool value setpoint. The controller 16 further determines the quantity of condensate discharged from the collection volume using a flow rate calculation for a choked flow of vaporizing liquid.