Why transparency about the calculation matters

Most panchangam sites show numbers without telling you where they come from. You have to trust that someone behind the scenes got it right. We do the opposite: the entire calculation is open, step by step, so you can follow along, and correct us if we get it wrong.

This is not about showing off technique. It is about trust. When your Rahu Kalam in Toronto is ten minutes different from your mother's in Chennai, the only answer that works is one you can trace back to precise input data and a transparent formula. Otherwise you are guessing, and that is not good enough when it concerns something you take seriously.

Below we walk through every layer of the calculation, from sunrise to festival dates, with the exact algorithms and constants. It is written so you can follow it without an astronomy background, but with enough detail that an engineer can verify every step.

Layer 1: The Sun, sunrise, sunset, day length

Everything begins with the Sun. Sunrise and sunset determine the daylight period, which in turn determines Rahu Kalam, Yamagandam, Kuligai, Abhijit Muhurtam and Gowri Panchangam. Get the Sun positions wrong, and the rest of the calculation is wrong too.

We use the NOAA Solar Calculator, the same algorithm that the US National Oceanic and Atmospheric Administration uses in their public solar calculator. It computes the Sun's ecliptic longitude, declination, equation of time, and the hour angle at sunrise from the Julian Day Number and the observer's latitude and longitude.

Worked example

Example: Chennai, 15 January 2026

Here is how sunrise is calculated step by step:

Date
15 January 2026

Input date

Julian Day
2,461,391.0

Gregorian date → Julian Day at noon UTC

Julian century (t)
0.2604

(JD − 2,451,545) / 36,525

Sun's geometric mean longitude
295.3°

280.47 + 36,000.77 × t

Sun's true longitude
295.4°

Mean longitude + correction terms

Declination
−21.3°

Sun's height above the celestial equator

Equation of time
−9.1 min

Difference between sundial and mean time

Solar noon UTC
07:23

720 − 4 × longitude − equation of time

Hour angle
84.7°

arccos(cosHA) for zenith 90.833°

Sunrise UTC
01:04

Solar noon − 4 × hour angle

Sunrise local time
06:34 IST

UTC + 5:30 (India's time zone)

Sunrise in Chennai on 15 January 2026 is 06:34 IST, and every further calculation builds on that number.

Layer 2: The Moon, Meeus, chapter 47

The Moon's position is critical for tithi, nakshatra, yoga and karana, four of the panchangam's five elements that are not the weekday. The Moon moves fast: about 13° per day, versus the Sun's roughly 1°. That is why a precise panchangam needs a good lunar model.

We use Jean Meeus' Astronomical Algorithms, chapter 47, the full 60-term ΣL series for the Moon's ecliptic longitude. This is the same model that serious almanacs and planetarium software use. The series sums 60 harmonic terms modelling all known perturbations of the Moon's orbit.

The result is the Moon's apparent ecliptic longitude in degrees (0°–360° along the zodiac). Combined with the Sun's ecliptic longitude, this gives us the tithi (Moon minus Sun elongation). Combined with the ayanamsa, it gives us the nakshatra (the Moon's sidereal position).

ElementDefinitionFormula
Tithi (1–30)Moon–Sun angular distance ÷ 12°floor(elongation / 12) + 1
Nakshatra (1–27)Moon's sidereal longitude ÷ 13°20'floor(moon_sidereal / 13.333)
Yoga (1–27)Sum of Sun and Moon sidereal longitudes ÷ 13°20'floor((sun_sid + moon_sid) / 13.333)
Karana (1–60)Half-tithi step: elongation ÷ 6°floor(elongation / 6)
VaaramWeekday, no astronomy involvedJavaScript getDay()
How each of the panchangam's five elements is computed from Sun and Moon positions.

Layer 3: Ayanamsa, Lahiri (Chitrapaksha)

Tithi depends on the angle between the Sun and Moon, it is the same regardless of coordinate system. But nakshatra, yoga and rashi require sidereal coordinates: positions relative to the fixed stars, not relative to the vernal equinox.

The difference between tropical and sidereal position is called the ayanamsa. We use Lahiri (Chitrapaksha), the standard officially used by the Indian government since 1956, and the most widespread in Tamil panchangam tradition. Our model is linear, anchored at the J2000 epoch.

Worked example

Lahiri ayanamsa in practice

The formula is simple:

Ayanamsa at J2000
23.85°

Starting point, 1 January 2000

Precession rate
~50.26 arcseconds/year

≈ 1.396° per Julian century

Ayanamsa in 2026
≈24.21°

23.85 + 1.396 × 0.26

All sidereal positions are calculated by subtracting this ayanamsa from the tropical longitude.

Other systems (KP, Raman, Yukteshwar) use slightly different values, but the difference is under 2°, typically enough to shift a nakshatra boundary only in rare cases.

Layer 4: Rahu Kalam and the three avoid-windows

Rahu Kalam, Yamagandam and Kuligai are all based on the same principle: divide the daylight period (sunrise to sunset) into eight equal segments, and select one segment based on the weekday. It is pure arithmetic, but the precise result depends on correct sunrise and sunset.

WeekdayRahu (segment)YamagandamKuligai
Sunday8th segment5th segment7th segment
Monday2nd segment4th segment6th segment
Tuesday7th segment3rd segment5th segment
Wednesday5th segment2nd segment4th segment
Thursday6th segment1st segment3rd segment
Friday4th segment7th segment2nd segment
Saturday3rd segment6th segment1st segment
Segment assignment for all three avoid-windows. Each segment is daylight ÷ 8.

Worked example

Example: Rahu Kalam on a Monday in Chennai

Sunrise 06:34, sunset 18:00, Monday uses the 2nd segment:

Daylight
686 minutes

18:00 − 06:34 = 11h 26min

One segment
85.75 min

686 / 8 ≈ 1h 26min

2nd segment start
06:34 + 85.75 = 08:00

Sunrise + 1 × segment length

2nd segment end
08:00 + 85.75 = 09:26

Start + segment length

Rahu Kalam Monday in Chennai, January: approximately 08:00–09:26 IST.

Layer 5: Abhijit Muhurtam, the auspicious midday window

Abhijit Muhurtam is the 8th of 15 equal muhurta segments in the daylight period, centred precisely on solar noon. The calculation is simple but requires accurate sunrise and sunset:

  • Solar noon = (sunrise + sunset) / 2
  • Half muhurta = (sunset − sunrise) / 30
  • Abhijit start = solar noon − half muhurta
  • Abhijit end = solar noon + half muhurta

In Chennai January (sunrise 06:34, sunset 18:00) this gives an Abhijit window from about 11:55 to 12:40, roughly 45 minutes. In Copenhagen in June, where the days are much longer, the window lasts over an hour.

Layer 6: Festivals and observances

Festivals use two entirely different source systems. Major fixed festivals (Pongal, Deepavali, Thai Pongal, Puthandu) are editorially curated: manually entered dates, double-checked against official calendar publications, with data from 2026 to 2029.

Monthly observances (Amavasai, Pournami, Ekadasi, Pradosham, Sashti, Karthigai, etc.) are computed live from tithi and nakshatra, exactly the same calculation you just read about. The computation always uses sunrise in Chennai as the reference point, even when you are sitting in London. Why? Because a festival's date is determined by the tithi prevailing at sunrise in the holy land, not your local sunrise.

No external dependencies, and that is deliberate

The entire engine is written in pure TypeScript. It imports no external astronomy library, calls no API, and looks up nothing in a database. The same code runs on the server when the page is built, and in your browser when you select a new city. The result is deterministic: the same input always, everywhere, gives exactly the same output.

That choice is deliberate. When the calculation is self-contained, there is no server that can go down, no API key that can expire, no third-party change that silently alters our numbers. And it means that you, or anyone, can verify every single number by reviewing the open source code.

ModuleAlgorithm / SourceWhat it provides
solar.tsNOAA Solar CalculatorSunrise, sunset, solar noon, Sun's ecliptic longitude
lunar.tsMeeus, Astronomical Algorithms ch. 47 (60-term ΣL)Moon's ecliptic longitude, tithi, nakshatra, yoga, karana
lunar.tsLahiri ayanamsa (23.85° + 1.396 × t)Sidereal position for nakshatra and yoga
windows.tsDaylight ÷ 8, segment per weekdayRahu Kalam, Yamagandam, Kuligai
index.ts(sunrise + sunset) / 2 ± daylight/30Abhijit Muhurtam
gowri.ts8 Gowri segments from daylightGowri Panchangam / Nalla Neram
festivals.tsTithi/nakshatra at Chennai sunrise + curated datasetFestival dates and observances
tamilCalendar.tsSun's sidereal longitude → Tamil monthTamil date (Chithirai, Vaikasi etc.)
All modules in the computation engine and their sources.

What we do not compute, and why

This calendar focuses on what can be computed with astronomical precision. But there are topics in the panchangam universe that we deliberately do not cover with calculations, because they require either subjective judgements or traditions that vary between schools:

  • Muhurtham approval for weddings and ceremonies, requires horoscope interpretation, which we do not automate.
  • Dasha periods and planetary strength, depend on astrological tradition, not astronomy.
  • Temple festivals with local variations, determined by individual temple traditions, not centrally.

We would rather show nothing than a number we cannot stand behind. That is the founding principle of this entire calendar.