There is this nice and new applet of the orbits of the planets around the sun:

Solar System Orrery

You can click and drag any planet and watch their relative orbits evolve in time. I was curious about planetary alignments$^\color{red}{1}$ and have these questions:

  1. I have observed that the first three gas giants (Jupiter, Saturn, and Uranus) align at years 1623, 1941, 2259, etc, with an approximate interval of 317 years. How do we explain $317$ from the orbital period of these three planets?
  2. In what years will the fourth gas giant (Neptune) join in the alignment, and in what intervals?
  3. Out of curiosity, in what years will Earth be aligned to all four gas giants, and in what intervals?

$\color{red}{1}$. The orrery is divided into 12 sections. We will define an alignment as "in a line in the same section".

P.S. This PSE post says there were alignments on 1665 and 2673. With this orrery as a visual aid, these years don't look impressive. Also, this Cornell Univ site says there will be at 2854 but it doesn't look much either. (A picture really is worth a thousand words.)

  • $\begingroup$ The closest I've found so far is the year 1306 when all four of the gas giants were almost in the same section. But they are not quite "aligned" yet. $\endgroup$ – Tito Piezas III Aug 3 '15 at 15:10

How long time does it take before three planets achieve the same relative position?

The answer is never, except for the case when their orbital periods can be expressed with low integers, like the 4:2:1 resonance of Io, Europa and Ganymede

However, what you are asking about is when they are going to be in almost the same position again, a quazi-period.

To find those periods, we are pretty much only left by brute forcing as our method. A nice little detail about the case with three planets is that the inner planet is always aligned with one of the other ones at the closest three-planet alignments. That allows us to calculate accurate solutions. In the cases of four or even five planets I simply give up.

To check all the possibilities, we can use a program. Here is an example of a function in JavaScript returning a list of quazi-periods and alignment error:

sameLine = function (period1,period2,period3,limit){
    results = [];
    newMargin = 1;
    synodic1 = 1/(1/period1 - 1/period2);
    anomaly1 = (synodic1/period1) % 1;
    synodic2 = 1/(1/period1 - 1/period3);
    anomaly2 = (synodic2/period1) % 1;
    for (i = synodic2; i < limit; i+=synodic2){
        numb1 = i/synodic1 - (i/synodic1) % 1;
        numb2 = i/synodic2 - (i/synodic2) % 1;
        err1 = Math.abs((numb1 * anomaly1 - numb1 * synodic1/period3) % 1);
        err2 = Math.abs((numb2 * anomaly2 - numb2 * synodic2/period2) % 1);
        if (err1 > 1 - err1){
            err1 = 1 - err1;
        if (err2 > 1 - err2){
            err2 = 1 - err2;
        if ((err1 < newMargin) && (numb1 > 0)){
            results.push([numb1 * synodic1,err1]);
            newMargin = err1;
        if ((err2 < newMargin) && (numb2 > 0)){
            results.push([numb2 * synodic2,err2]);
            newMargin = err2;
    return results;

For Jupiter, Saturn and Uranus, I get the following output:



The first of this periods is of no use, as the error in alignment is almost a third of an orbit. Note that the one you found (that is really impressive you did,actually) gives an error in the alignment of less than a percent. We have to look at periods more than a thousand years long to find any better alignment.

Be sure to feed this function with accurate orbital periods.

  • $\begingroup$ I'm working on an alternate version of this and was wondering if you could tell me what values you used for period1, period2, and period3? $\endgroup$ – user854 Mar 2 '16 at 15:35
  • $\begingroup$ @barrycarter Basically just wikipedia's values in days, 4332.59, 10759.22 and 30688.5 $\endgroup$ – SE - stop firing the good guys Mar 2 '16 at 15:46

This isn't an answer, but too long for a comment.

I emailed the site owner, Jeroen Gommers, and it turns out the planets do not move the same number of degrees per unit time (most noticeable for Eris). Here is his reply to my question re formulas for the orbits:

The interactive doesn't actually use any formulas to constantly calculate positions. In order to keep the planets moving smoothly, each planet is animated based on its orbit that follows from its orbital elements.


Eris, like the others, doesn't orbit the sun with a constant speed and its orbit is also quite elliptical. That's why you see it speed up and slow down.

On an unrelated note, I was working on answer to this assuming fixed angular motion:


if anyone's interested in contributing or viewing.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.