A system and method for dispensing a beverage includes the detection of a presence of a cup underneath a nozzle, and in response to the detected presence of the cup, a target fill height is calculated. The controller operates to begin a dispense of a beverage into the cup. A beverage fill height determined and compared to a target fill height. When the beverage fill height exceeds the target fill height, the controller operates to stop dispensing the beverage into the cup.