AbstractAligned with the goals of achieving higher sustainability in water systems, the minimization of energy costs is a top priority for the operators and owners of such systems. Early research contributions on the rate of energy dissipation due to head losses, defined as energy slope J, demonstrated that this parameter can be optimized so that such cost minimization is achieved. However, an important factor that was not considered in previous research is that water demand might be variable during the lifetime of water systems. Whether due to daily variation patterns, seasonal changes, or long-term water demand growth, variations on the flow rate complicates the determination of the optimized energy slope Jopt that will minimize energy costs. This work addresses this knowledge gap, performing an evaluation of how demand variation impacts Jopt and how deviations from the optimum energy slope affect costs for varying water demands. In addition, this work also provided insights into pipe cost installation terms and pipe cost exponents using real-world data of existing water systems in Spain. Such exponents are very important in the computation of optimum energy slopes. It is hoped that this research will provide practical guidance to designers and operators of water systems regarding the minimization of energy costs, leading to greater sustainability of such systems.