A water heater for heating water stored in at least one vessel, comprising a heat pump for performing a thermodynamic cycle for providing heat from a refrigerant fluid to the water for heating of the water, wherein the heat pump is arranged for circulating the refrigerant fluid through a plurality of heat exchanger units (8, 9, 10) such as to cool the refrigerant fluid from a superheated gas state to a sub-cooled liquid state while providing heat to the water, wherein the plurality of heat exchanger units comprises: a first heat exchanger unit for pre-heating of the water while cooling the refrigerant fluid to the sub-cooled liquid state, comprising a first water conduit for transferring heat from the refrigerant fluid to the water; and a second heat exchanger unit (9, 10) including a refrigerant condenser unit for further heating of the water while condensing the refrigerant fluid, the second heat exchanger unit comprising a second water conduit (37, 46) for transferring heat from the refrigerant fluid to the water; characterized in that the water heater further comprises one or more water inlets (29, 35) for providing water to the heat exchanger units, at least one water outlet (43, 48) for returning water from the heat exchanger units to the vessel, and a plurality of flow regulation units including a first regulation unit for establishing a water flow through the first water conduit and a second regulation unit for establishing a water flow through the second water conduit, further comprising a control unit connected to at least two temperature sensors (32, 33, 34, 39, 40, 45) and configured to determine a temperature difference between the water and the refrigerant fluid in at least one of the heat exchanger units (8, 9, 10), said control unit being further connected to one or more of the flow regulation units (30, 36, 42) associated with said at least one heat exchanger unit (8, 9, 10), and configured to control said flow regulation unit dependent on the determined temperature difference, for enabling independent regulation of the flow rate through said first and second water conduit for controlling the temperature difference between the refrigerant fluid and the water in each of the first and second heat exchanger unit across the respective heat exchanger unit. a first heat exchanger unit for pre-heating of the water while cooling the refrigerant fluid to the sub-cooled liquid state, comprising a first water conduit for transferring heat from the refrigerant fluid to the water; and a second heat exchanger unit (9, 10) including a refrigerant condenser unit for further heating of the water while condensing the refrigerant fluid, the second heat exchanger unit comprising a second water conduit (37, 46) for transferring heat from the refrigerant fluid to the water; characterized in that the water heater further comprises one or more water inlets (29, 35) for providing water to the heat exchanger units, at least one water outlet (43, 48) for returning water from the heat exchanger units to the vessel, and a plurality of flow regulation units including a first regulation unit for establishing a water flow through the first water conduit and a second regulation unit for establishing a water flow through the second water conduit, further comprising a control unit connected to at least two temperature sensors (32, 33, 34, 39, 40, 45) and configured to determine a temperature difference between the water and the refrigerant fluid in at least one of the heat exchanger units (8, 9, 10), said control unit being further connected to one or more of the flow regulation units (30, 36, 42) associated with said at least one heat exchanger unit (8, 9, 10), and configured to control said flow regulation unit dependent on the determined temperature difference, for enabling independent regulation of the flow rate through said first and second water conduit for controlling the temperature difference between the refrigerant fluid and the water in each of the first and second heat exchanger unit across the respective heat exchanger unit.