Proper Distance Formula