Calculate distance between two points

Hi, I need to calculate the distance between two points (preferably without using entities). I can get the difference between their X/Y/Z axis, and I would use that with (x^2 + y^2 + z^2 = d^2) to find the distance, but I can't square root d to find the distance. Is there any (other?) way to caluclate the distance between two points? I only need to check if a player is 500+ blocks away from their spawn point.
Continue to help post