The distance is d = 15988.75 km.
Consider the coordinates of the two cities:
New York = (40.71° N, 74.01° W);
Sydney = (33.87° S, 151.21 E°).
Now plug the coordinates in the formula for the great circle on a sphere:
d = r × arccos(cos(φA) × cos(φB) × cos(λA - λB) + sin(φA) × sin(φB))
d = 6371 × arccos(cos(40.71°) × cos(-33.87°) × cos(74.01° + 151.21°) + sin(40.71°) × sin(-33.87°))
d = 15988.75 km
Notice we used negative signs for the southern and eastern hemispheres. Read more