Question: I'm measuring the synodic period of Mercury using Stellarium. When measuring the synodic period one needs to choose a reference point to start the measurement, and I choose the point when Mercury is on top of the Sun. This is the start date:

[![enter image description here](https://i.stack.imgur.com/2JRby.png)](https://i.stack.imgur.com/2JRby.png)

And this is the end date:

[![enter image description here](https://i.stack.imgur.com/Qga8w.jpg)](https://i.stack.imgur.com/Qga8w.jpg)

Inputting these two dates into [a calculator](https://www.timeanddate.com/date/durationresult.html?d1=19&m1=4&y1=2021&d2=1&m2=08&y2=2021) gives a synodic period of 104 days. However, as one can see from Stellarium's data, Mercury's synodic period is actually 115.88 days. This measurement is off by more than 10 days.

Why is there such a large difference? It's not large in the absolute sense, but it seems well above the error margins. For example if instead I shift the start date to 9 April 2021, Mercury is discernibly not between us and the Sun.

Answer: 
Mercury's orbit is highly eccentric: 0.21 according to [Wikipedia](https://en.wikipedia.org/wiki/Mercury_(planet)). Therefore, the actual time between repeating occurrences will vary depending on the year. If you were to perform your calculations for many periods, the average should approach the value given by Stellarium.

The theoretical synodic period, using the sidereal period of Earth and Mercury, is 115.9 days.
Addressing [@Allure's comment](https://astronomy.stackexchange.com/questions/33189/what-is-wrong-with-this-measurement-of-the-synodic-period-of-mercury#comment61564_33192) below [@ JohnHoltz's excellent answer](https://astronomy.stackexchange.com/a/33192/7982), the synodic period is simply a function of the two periods. 

It will return something like the average value between two successive events where the planets would line up *if they orbited in the same plane*, but it does not predict the exact times as pointed out in that answer.

In addition to the fact that the orbits can be elliptical producing jitter, they can also have very different inclinations. In that case they will usually not line up at all, even if the orbits are circular. 

For a real-world example, try to use your same method to calculate the synodic period between Neptune and Pluto, with inclinations of about 2° and 17° and eccentricities of 0.01 and 0.25 respectively. Now imagine a body with an inclination of 90°!

[Synodic period](https://en.wikipedia.org/wiki/Orbital_period#Synodic_period) is just the period that is returned by the equation below, a function of two other periods, and you have to decide for yourself how applicable or useful the value is for your own application.

$$T\_{syn} = \frac{1}{\frac{1}{T\_1}-\frac{1}{T\_2}} = \frac{T\_1 T\_2}{T\_2-T\_1}$$