There’s a formula for figuring out how far you can fly with a given battery percentage, although I don’t know it off the top of my head, but it will avoid the need for an emergency landing due to low battery.
The time to RTH depends on several factors including wind speed and direction, and how far away you’re from the RTH point, and I’ve had an auto landing short of the RTH point due to trying to RTH at just above 50%, and ended up having to hunt down the AC.