Stovetop vs water heater efficiency
A gas stove-top is about 44% efficient (source), and a modern natural gas water heater with a tank is up to 67% efficient (source (pdf)).
Basic formula
From this answer on Chemistry.SE, the energy needed to heat a liquid from one temperature to another is:
Q = (mass)*(specific heat)*(change in temperature)
For water, the specific heat is simply 1 kcal/(kg °C), so we can leave this out. The mass of water is 1 kg per L.
Total energy needed
Applying the formula:
Q = (5kg)*(100°C - 8°C) = 460kcal
Energy needed from each source
Starting with cold water in the pipes, volume is length * π * radius² = approximately 1.5L:
- In the pot we'll need to heat this 1.5L from 8°C to 100°C = 138kcal
- The remaining 3.5L is heated from 8°C to 49°C in the water heater = 143.5kcal...
- ...and then the rest of the way to 100°C in the pot: 178.5kcal
If the water at the tap is already hot, the breakdown is:
- Heat from 8°C to 49°C in the water heater = 205kcal
- And from 49°C to 100°C in the pot = 255kcal
Final comparison
- Stovetop only:
460kcal / 44% = 1045kcal
- Using the water heater, starting with cold water at the tap:
(138+178.5)/44% + 143.5/67% = 934kcal
- Using the water heater, starting with hot water at the tap:
255/44% + 205/67% = 886kcal
So using hot water from the tap will save anywhere between 11% and 15% compared to using just cold water.