a compact tankless water heater of modular configuration to accommodate a range of potential demands is disclosed . a heat transfer chamber is divided into subchambers , each of which may may mount more than one heating element . notched passageways at the top of each dividing wall allow water passage between chambers , and a plurality of temperature sensors act in concert with a flow sensor and microprocessor control of the heating elements to maintain a constant set point output water temperature .