Science Lab · Astronomy

Sky and Solar System

Pick any moment from 1800 to 2050 and see where the planets really were. Run time forward and watch Mercury race around the Sun, Mars seem to go backwards, and the Moon run through its phases. Then find out why the Sun, Earth and Moon only line up for an eclipse a few times a year. The positions come from the orbit formulas that NASA’s Jet Propulsion Laboratory publishes.

View

Date and time

Speed

Solar system

Moon

Eclipses

Your sky

Live numbers

Missions

    What you’re seeing

    Solar system. The Sun and the eight planets seen from far above Earth’s North Pole, at their real places for the date you pick. Everything goes around the same way, counterclockwise. With To scale, distances are true and you can zoom; the planets are drawn far bigger than they really are, or you could not see them. With Spread out, distances are squeezed so all eight fit, but each planet still sits in its true direction from the Sun.

    The strip along the bottom shows the sky as seen from Earth: the band of stars along the ecliptic, the path the Sun, Moon and planets follow. East is on the left, as when you face south from the Northern Hemisphere. Pick a planet under Follow from Earth to zoom in on it, with the trail of where it has been over the last 150 days. Up and down are stretched to make small wobbles visible.

    Moon. On one side, the Moon as you see it from Earth. On the other, the view from far above: the Sun shines from the right, so one half of the Moon is always lit. The ring shows the eight named phases. You can drag the Moon around its orbit to move time.

    Eclipses. The top picture shows the Moon’s orbit around Earth, tilted against the plane of Earth’s orbit (the ecliptic). The two places where it crosses that plane are the nodes. The chart below follows the Moon’s height above or below the ecliptic through the whole year, with a dot at each new moon (●) and full moon (○). Drag the chart to change the date.

    Tonight. The whole sky above you, about an hour after sunset or an hour before dawn, for the latitude and longitude you choose. The middle of the circle is straight overhead and the edge is the horizon. Only the Moon, the five planets you can see without a telescope, and a few of the brightest stars are drawn.

    Times are shown in your device’s time zone. The date can go from 1800 to 2050, the range of the orbit table the planets come from.

    The science

    Orbits are ellipses

    Every planet moves on an ellipse with the Sun at one focus. Six numbers describe each one: its size a (half the long axis), its stretch e (eccentricity), its tilt, which way it points, and where the planet is on it at a starting date. JPL gives these numbers for the year 2000 and how fast each one slowly changes. To find a planet on any date, the program solves Kepler’s equation for the angle E:

    M = E − e sin E  then  x = a(cos E − e),  y = a√(1 − e²) sin E

    M, the mean anomaly, grows at a steady rate through each orbit. A last turn by the orbit’s tilt and direction puts the planet in place among the others.

    Kepler’s third law

    Planets close to the Sun go around faster, and they also have a shorter way to go. With the period T in years and the orbit size a in astronomical units (1 au = 149,597,870.7 km, about Earth’s distance from the Sun):

    T² = a³

    Mercury: a = 0.387 au, so T = 0.3871.5 = 0.241 years, or 88 days. Neptune: a = 30.07 au, T = 165 years. Mercury moves at about 47 km/s on average; Neptune at about 5.4 km/s.

    Why planets seem to go backwards

    Night after night, a planet drifts slowly east among the stars. But every so often an outer planet stops, goes west for a while, and then turns east again. That is retrograde motion. Nothing about the planet changes: Earth, on the faster inside lane, is passing it, the way a slower car seems to slide backwards when you overtake it. It happens around opposition, when Earth is right between the Sun and the planet and the planet is up all night. Earth laps Mars once every 780 days, so Mars goes backwards about every 26 months. In the model, Mars runs backwards from 10 January to 1 April 2027, with opposition on 19 February.

    How far from the Sun can Venus get?

    Venus’s orbit is inside Earth’s, so from Earth it can never get far from the Sun. The biggest angle comes when our line of sight just touches its orbit:

    sin θmax ≈ aVenus / aEarth = 0.723  →  θmax ≈ 46°

    This is greatest elongation. Because the orbits are not quite circles, the real value runs from about 45° to 47°; on 15 August 2026 it is 45.9°. For Mercury, with its more stretched orbit, it ranges from about 18° to 28°. That is why Venus and Mercury are only seen in the evening after sunset or in the morning before dawn, never at midnight.

    Moon phases

    The Sun always lights half of the Moon. How much of that lit half we see depends on the angle Sun–Moon–Earth, the phase angle i. The lit fraction of the disk is

    k = (1 + cos i) / 2

    At new moon i is close to 180° and k ≈ 0; at full moon i is close to 0° and k ≈ 1. Phases are named from the angle between the Moon and the Sun as seen from Earth: 0° is new moon, 90° first quarter, 180° full moon and 270° last quarter. One full cycle takes 29.53 days on average, two days longer than the 27.32 days the Moon needs to go once around Earth, because Earth has moved along its own orbit in the meantime.

    Why eclipses are rare

    A solar eclipse needs a new moon right in front of the Sun; a lunar eclipse needs a full moon right inside Earth’s shadow. But the Moon’s orbit is tilted 5.1° to Earth’s. Most months the new moon passes a little above or below the Sun, and the full moon above or below the shadow. For a solar eclipse the new moon has to be within about 1.5° of the ecliptic, and for the full moon to dip into the dark core of Earth’s shadow, within about 1°. That only happens near the nodes.

    The line of nodes keeps nearly the same direction in space, so the Sun lines up with it twice a year, about 173 days apart: these are the eclipse seasons. Each lasts about 35 days, longer than one cycle of phases (29.5 days), so every season has at least one solar eclipse, usually with a lunar eclipse two weeks before or after. The nodes slowly slide backwards, once around in 18.6 years, so eclipse seasons come about 19 days earlier each year.

    Eclipses of 2026 and 2027, worked out by this simulation (the same dates and types as NASA’s eclipse lists). Where on Earth each one can be seen is not part of the model.
    DateEclipseDateEclipse
    17 Feb 2026Annular solar6 Feb 2027Annular solar
    3 Mar 2026Total lunar20 Feb 2027Penumbral lunar
    12 Aug 2026Total solar18 Jul 2027Penumbral lunar
    28 Aug 2026Partial lunar2 Aug 2027Total solar
    17 Aug 2027Penumbral lunar

    Try this

    A race around the Sun. In Solar system, with Inner planets, set 1 week/s. Count Mercury’s laps while Earth goes once around. You should get a little over four (365 ÷ 88 = 4.15).
    Mars turns back. Choose “Mars before it turns back” and follow Mars. Play at 1 day/s and watch its trail in the strip. Then look at the top view: Mars goes backwards just when Earth passes it on the inside.
    Evening star, morning star. Follow Venus and play at 1 week/s through 2026. It climbs away from the Sun on the left (the evening sky), stops near 46°, swings back past the Sun in October and comes out on the right (the morning sky).
    A month of Moons. In the Moon view, play at 1 day/s and say each phase out loud before its name appears. When does the Moon rise at sunset? (Hint: it’s opposite the Sun.)
    Eclipse seasons slide. In Eclipses, look at 2026, where the seasons are in February–March and August. Step one year later with ›. The shaded seasons move about 19 days earlier each year.
    Moon phases with a lamp. In a dark room, put a lamp without its shade on a table across the room (don’t touch the bulb; it gets hot). Hold a ball out at arm’s length and turn slowly around on the spot, watching the ball. You will see a crescent, a half, a full ball and a new moon. When the ball’s shadow falls on your head, that is a solar eclipse; when your head’s shadow falls on the ball, a lunar eclipse.

    A common mistake: “Phases are Earth’s shadow”

    Many people think the dark part of the Moon is Earth’s shadow falling on it. It isn’t. Earth’s shadow points straight away from the Sun, so it can only reach the Moon at full moon, when the Moon is on the far side of Earth. That is a lunar eclipse, and it happens only a few times a year.

    The phases come from where we stand. The Sun always lights half the Moon. At new moon the lit half faces away from us. As the Moon moves around, we see more and more of the lit half, then less again. In the Moon view, look from above: every Moon on the ring is half lit, but from Earth they look completely different.

    Watching a solar eclipse. Never look straight at the Sun, even when most of it is covered; it can hurt your eyes. Use proper eclipse glasses (made to the ISO 12312-2 standard) or a pinhole projector, a small hole in a card that throws an image of the Sun onto paper. The total phase of a total eclipse is the only time it is safe to look without them, and only until the first bit of Sun comes back.

    How the simulation works

    The planets. Each planet follows a Kepler ellipse whose six numbers change slowly with time, from Table 1 of JPL’s “Approximate Positions of the Planets” (valid from 1800 to 2050). JPL states the typical error of this table: 15″ in direction for Mercury, 20″ for Venus and Earth, 40″ for Mars, 400″ for Jupiter, 600″ for Saturn, 50″ for Uranus and 10″ for Neptune (1″ is 1/3600 of a degree). The table describes the center of mass of Earth and Moon; the program moves Earth 4,670 km from it, opposite the Moon. Seen from Earth, it allows for the time light takes to arrive and for Earth’s own motion (aberration).

    The Moon. The Moon is not a simple ellipse, because the Sun tugs on it. It follows the series in Jean Meeus’s Astronomical Algorithms (chapter 47): 128 sine terms for its direction and 46 cosine terms for its distance, good to about 10″. Phases and eclipses are found by searching for the moments when the Moon–Sun angle is 0°, 90°, 180° or 270°. Eclipse types come from the sizes of the Sun, Moon and shadows seen from Earth’s center, with Earth’s shadow made 1% bigger for its atmosphere, as NASA does.

    What’s left out. The pulls of the planets on one another beyond what JPL’s slowly changing numbers include; nutation (a small nod of Earth’s axis, under 20″); bending of light by the air, except at sunrise and sunset; and the tilt of the Moon’s lit side as it moves across the sky. The planets and Sun are drawn far larger than to scale. Time uses ΔT, the gap between clock time and the steady time of the orbits: about 69 seconds today.

    How it was checked. Written tests compare the model with published tables:

    • Meeus’s worked example for the Moon (12 April 1992): all three sums and the answer agree to every digit (longitude 133.162655°, latitude −3.229126°, distance 368,409.7 km).
    • All 50 primary Moon phases of 2026 against the US Naval Observatory: every one within 1.5 minutes (average difference 0.4 min). The Observatory lists them to the minute.
    • All 44 eclipses of 2021–2030 on NASA’s eclipse lists: every one found, no extra ones, all 44 types right (including the rare hybrid eclipse of 20 April 2023), times within 1.5 minutes, lunar umbral magnitudes within 0.002.
    • 17 conjunctions and oppositions of 2026 from the National Astronomical Observatory of Japan: Mercury, Venus and Uranus within 5 minutes; Mars, Jupiter and Neptune within 28 minutes; Saturn within 2 hours. In angle that is at most 53″, except Saturn at 311″, inside its 600″.
    • Greatest elongations of Mercury and Venus in 2026: the angles agree with the Observatory’s to within 0.4′ (Venus 45.89° against 45°53′).
    • Transit of Venus, 6 June 2012: closest to the Sun’s center at 01:35 UT, 9.2′ from it, against NASA’s 01:30 UT and 554″ (9.2′).
    • Sidereal time and the altitude of Venus in Meeus’s examples 12.a, 12.b and 13.b: equal to 0.0001°. Sunrise and sunset at 0° N, 0° E on 26 September 2026: 05:48 and 17:55 UT, the same minutes as the Naval Observatory; moonrise 17:49, also the same.

    Sources

    @teddyrookbook GitHub