If you wanted to compute it exactly, you’d have to take into account the elliptical path the moon takes around the earth each lunar month, plus the elliptical path taken by the moon around the sun each year as it’s dragged along by the earth-moon system, whose center of mass is closer to earth’s surface than center & whose orbital plane is not precisely the ecliptic (which is why every full moon does not produce an eclipse).
It’s been a long time since I set up and calculated integration paths along parametrized epicycloid curves in 3 dimensions! Even assuming circular, coplanar orbits, I suppose that the calculation is now the job of astrophysical software. Not to mention Google
So I’m sure you could look up the exact distance traveled by the moon (they use Apollo-era corner reflectors to return a laser beam to its source for continuous & precise ranging of Earth-Moon distance). We can do a “back of the envelope” calculation instead…
——————
Simplify by treating the two motions of the moon (orbiting earth, orbiting sun) separately—(A) Calculate how far the moon travels orbiting the earth for one lunar cycle, multiplied by number of lunar cycles per year. This assumes the Earth is standing still. (B) Add the orbital length of the Earth around the sun each year & assume it’s the same for the moon.
The moon is about a quarter-million miles away, more like 240,000 miles mean. Orbital circumference is thus (240,000)*2*pi = 1.51 million miles. If a lunar cycle is 27.3 days, then there are 365 / 27.3 = 13.4 cycles. (1.51)(13.4) = 20 million miles a year orbiting Earth.
At a distance of 93 million miles from the sun, the earth (and its moon) travels about
(93)2*pi = 584 million miles a year. Compare: (20 / 584) = 3%. We thus estimate *the moon’s orbit around the earth adds only 3% to its total distance traveled through the solar system.
What about speeds? Based on our numbers, the earth’s speed is (584 million / 365) / 24 = 67,000 mph, while the moon’s speed relative to earth is (1.51 million / 27.3) / 24 = 2,300 mph. Compare: (2300 / 67,000) = 3%. Thus the moon orbits the earth at only about 3% of the speed with which they both orbit the sun, assuming the solar system is fixed. This is confirmed by this image of the moon’s path around sun here, showing the path as convex.
Although the moon travels “backward” during half of each lunar cycle, this only lowers its forward motion by those 3%. In geometrical parlance the path is approximated by a highly curtate epicycloid.
Here’s a nice quote from the link above:
”Imagine you’re driving on a circular race track. You overtake a car on the right, and immediately slow down and go into the left lane. When the other car passes you, you speed up and overtake on the right again. You will then be making circles around the other car, but when seen from above, both of you are driving forward all the time and your path will be convex.”