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
- Julian Day
- 2,461,391.0
- Julian century (t)
- 0.2604
- Sun's geometric mean longitude
- 295.3°
- Sun's true longitude
- 295.4°
- Declination
- −21.3°
- Equation of time
- −9.1 min
- Solar noon UTC
- 07:23
- Hour angle
- 84.7°
- Sunrise UTC
- 01:04
- Sunrise local time
- 06:34 IST
Input date
Gregorian date → Julian Day at noon UTC
(JD − 2,451,545) / 36,525
280.47 + 36,000.77 × t
Mean longitude + correction terms
Sun's height above the celestial equator
Difference between sundial and mean time
720 − 4 × longitude − equation of time
arccos(cosHA) for zenith 90.833°
Solar noon − 4 × hour angle
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).
| Element | Definition | Formula |
|---|---|---|
| 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) |
| Vaaram | Weekday, no astronomy involved | JavaScript getDay() |
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°
- Precession rate
- ~50.26 arcseconds/year
- Ayanamsa in 2026
- ≈24.21°
Starting point, 1 January 2000
≈ 1.396° per Julian century
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.
| Weekday | Rahu (segment) | Yamagandam | Kuligai |
|---|---|---|---|
| Sunday | 8th segment | 5th segment | 7th segment |
| Monday | 2nd segment | 4th segment | 6th segment |
| Tuesday | 7th segment | 3rd segment | 5th segment |
| Wednesday | 5th segment | 2nd segment | 4th segment |
| Thursday | 6th segment | 1st segment | 3rd segment |
| Friday | 4th segment | 7th segment | 2nd segment |
| Saturday | 3rd segment | 6th segment | 1st segment |
Worked example
Example: Rahu Kalam on a Monday in Chennai
Sunrise 06:34, sunset 18:00, Monday uses the 2nd segment:
- Daylight
- 686 minutes
- One segment
- 85.75 min
- 2nd segment start
- 06:34 + 85.75 = 08:00
- 2nd segment end
- 08:00 + 85.75 = 09:26
18:00 − 06:34 = 11h 26min
686 / 8 ≈ 1h 26min
Sunrise + 1 × segment length
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.
| Module | Algorithm / Source | What it provides |
|---|---|---|
| solar.ts | NOAA Solar Calculator | Sunrise, sunset, solar noon, Sun's ecliptic longitude |
| lunar.ts | Meeus, Astronomical Algorithms ch. 47 (60-term ΣL) | Moon's ecliptic longitude, tithi, nakshatra, yoga, karana |
| lunar.ts | Lahiri ayanamsa (23.85° + 1.396 × t) | Sidereal position for nakshatra and yoga |
| windows.ts | Daylight ÷ 8, segment per weekday | Rahu Kalam, Yamagandam, Kuligai |
| index.ts | (sunrise + sunset) / 2 ± daylight/30 | Abhijit Muhurtam |
| gowri.ts | 8 Gowri segments from daylight | Gowri Panchangam / Nalla Neram |
| festivals.ts | Tithi/nakshatra at Chennai sunrise + curated dataset | Festival dates and observances |
| tamilCalendar.ts | Sun's sidereal longitude → Tamil month | Tamil date (Chithirai, Vaikasi etc.) |
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.