Either way, unless the ball is in front of you, that's difficult to tell.
From the endzone, if the ball is on the other side of the field, it's incredibly difficult.
Either way, endzone or sideline, I always just watch the ref on the sidelines to see where he's spotting the ball in relation to the chains/yard markers.