The answer to this question depends completely on the weather and on how plentiful water is on your route. In the Sierra, the answer is typically zero, i.e., there is almost never any need to carry any water on your back. (Nor is there any need to purify water in the Sierra; see https://outdoors.stackexchange.com/a/4058/2169 .) When you're thirsty, you stop at the next stream, lean down and scoop up some water, drink it, and then continue hiking. There is the myth that "thirst is too late," i.e., that you have to drink lots of water because you'll be dangerously dehydrated by the time you actually feel thirst; this is an urban folk tale.
If you're in a different environment, such as a hot desert, the answer could be totally different. For example, temperatures in the low-elevation areas around Palm Springs, California, have been recorded as high as 50 C (120 F). In these conditions, the amount of water you need is infinity. That is, your body's ability to cool itself is simply overwhelmed, and you may die no matter how much water you drink, if you're outside in the hot sun at midday. In this kind of heat a few years ago, one hiker was found dead, sitting peacefully on a rock, 100 meters away from a tennis court, with a full water bottle in his hand.