know how much a full tank can get you, and determine a comfortable amount of excess. I know I can get about 180mi on a tank, but I usually plan about 160. I reset my trip odometer every fill up so I know how much I've traveled since last fill up. If you're on a major road/hwy, there will generally be signs that say "next services in XX miles" if they are far apart. I look down at the odometer, do the quick math in my head, and determine if I need to stop now or at the next one.
Carry an extra gas can for piece of mind, but I think you're overthinking it. If you like to meticulously plan, go for it, but I'd rather not stress over it.