Site Map


                      software, applet, java, shareware, sun, moon

astronomy, software, applet, java, shareware,
                      sun, moon
Chaos Game
astronomy, software, applet, java,
                          shareware, sun, moon
astronomy, software, applet, java, shareware,
                      sun, moon


Astronomical Gearing

Al-Biruni's mechanical calendar

Instruments carrying gearings of toothed wheels (cogwheels) were used in the Late Antike or Byzantine period as calendrical devices, some of them displaying the phase (age) of the Moon, its position in the zodiac, and the position of the Sun in the zodiac.

A calendrical device with eight
cogwheels was described by the Persian Muslim scholar and polymath al-Biruni (978-1048).


The rotating Moon disc: 59 days rotation period, corresponding to 29.5 days for the synodic month.

The rotation period of the wheel (V, 39 cogs) for the sidereal month:

sidereal month ration

The rotation period of blue wheel (VIII, 60 cogs):


The rotation period of the red wheel (VI, 49 cogs) for the year:


average duration gears error
synodic month
29.530589 days 29.5 days
0.10 %
sidereal month
27.321661 days 27.3 days
0.08 %
tropical year
365.24219 days
365.17895 days
0.02 %

gears average
62 synodic month
62*29.5 d =
1829.0 d
1830.90 d
67 sidereal month
67*27.3 d =
1829.1 d
1830.55 d

5 years  2 d
5 years  4.5 d

full moon
2011 Feb 18, UT 23:00
Full Moon in Leo
2016 Feb 22, UT 23:00
Full Moon in Leo
1830 days later (5 years 4 days) the position of the full Moon is almost the same with respect to the fixed stars.

Full Moon
JD Diff days
Long. Moon
Diff Long. Long. Sun Diff Long.
1996 Jan 05 UT 22:08
2450088.369 - 104.80° -
284,86° -
2001 Jan 09 UT 20:24 2451919.350 1830.98 109.65° 4.85° 289,65° 4.80°
2006 Jan 14 UT 09:48 2453749.908 1830.56 114.08° 4.44° 294,09° 4.43°
2011 Jan 19 UT 21:21 2455581.390 1831.48 119.45° 5.36° 299,45° 5.37°
2016 Jan 24 UT 01:46 2457411.573 1830.18 123.49° 4.04° 303,49° 4.04°
2021 Jan 28 UT 19:16 2459243.303 1831.73 129,09° 5.60° 309,09° 5.60°

Al-Biruni's Moon Box:
from Wiedemann

Al Biruni moon Box

Biruni moon box mechanical
            calendar cogwheels

Counting the cogs of al-Biruni's drawing above:

cogs 7 10 20 23 40 48 59 58

In his paper, Wiedemann mentions the drawing to be erroneous:

"Die hier mitgeteilte Figur 2 ist der Leydener Handschrift entnommen;
ihr entspricht diejenige in der Berliner Handschrift,
beide sind nicht ganz korrekt" (p. 8)

My applet is using these numbers of cogs:

cogs 7 10 19 25 39 49 59 60

Al-Biruni Moon Box

The applet is also computing the apparent longitude of the Sun and the Moon, using algorithms of Jean Meeus,
taking into account the difference ∆T between Dynamical Time and Universal Time from MICA.
Comparing the applet's results and JPL ephemerides for the
Sun the mean absolute error is only 0.00004° = 0,15'',
Moon the mean absolute error is only 0.002° = 0,72''.

Selecting a date from the menu the position of the moon is set to the mean position of that date, remaining constant up to the next date:

                  pean longitude

The applet's moon is moving by 13.187° per day, while the mean longitude increases by 13.176°. The difference goes up to 3.8° per year:


The next diagram is showing the difference between the mean and apparent longitude of the moon (as in the upper left corner of my applet):

                  and apparent longitude of the moon

Web Links

Al Biruni's Moon Calendar (YouTube)

Abū Rayḥān al-Bīrūnī (Wikipedia)

Hill, al-Hassan: Engeneering in Arabic-Islamic Civilization

Month (Wikipedia)

Abu Arrayhan Muhammad ibn Ahmad al-Biruni (MacTutor History of Mathematics archive)

The Science of al-Biruni (A. C. Sparavigna)

Antikythera Mechanism Sun and Moon Flash Animation

The Antikythera Mechanism I: Java-animation of The Sun-Moon Assembly

The Antikythera Mechanism (age-of-the-sage.org)

The Antikythera Mechanism

Moon Sign Calculator

HORIZONS Web-Interface (ephemerides for solar-system bodies, JPL)

Books, Articles
J.V. Field, D.R. Hill, M.T. Wright: Byzantine and Arabic Mathematical Gearing, Science Museum, London 1985.

Jo Marchant: Decoding the Heavens, Solving the Mystery of the World's First Computer; William Heinemann, London 2008.

Jo Marchant: Die Entschlüsselung des Himmels, Der erste Computer - ein 2000 Jahre altes Rätsel wird gelöst; Rowohlt 2011.

Wiedemann, Eilhard: Ein Instrument, das die Bewegung von Sonne und Mond darstellt; Der Islam; Band 4, Heft 1, 1913; pp 5-13.

Hill, D. R.: Al-Biruni's Mechanical Calendar; Annals of Science; Vol 42, Issue 2, 1985; pp 139-163. (Summary)

Jean Meeus: Astronomical Algoritms, Willmann-Bell, First English Edition 1991.

MICA (Multiyear Interactive Computer Almanac) by U. S. Naval Observatory

Updated: 2023, Oct 04