Two divisions of the zodiac
The 360° circle splits into 27 nakshatras of 13°20′ and each nakshatra into 4 padas of 3°20′ - 108 padas in all. The engine computes both directly from the longitude:
utils/nakshatra.ts, as the birth chart uses it
const NAK = 360 / 27; // 13°20'
const PADA = 360 / 108; // 3°20'
nakshatraIndex = Math.floor(lon / NAK) % 27; // 0 = Ashwini
pada = Math.floor((lon % NAK) / PADA) + 1; // 1..4
lord = ["Ketu", "Venus", "Sun", "Moon", "Mars",
"Rahu", "Jupiter", "Saturn", "Mercury"][nakshatraIndex % 9];The nine lords repeat three times, so Ashwini, Magha and Mula share Ketu. Names and lords for all 27 are in the nakshatra reference.
Worked example from a recorded response
The sample birth's Moon comes back from POST /v1/charts/birth as "sign": "Sagittarius", "degree_in_sign": 20.539904. Sagittarius is the ninth sign, so the longitude is 8 × 30 + 20.539904 = 260.539904°.
- 260.539904 / 13.333333 = 19.54 → index 19 → nakshatra 20, Purva Ashadha, lord Venus.
- Purva Ashadha starts at 253°20′; the Moon is 7.2066° in (54.05% of the span) and 6.1268° from its end.
- 7.2066 / 3.3333 = 2.16 → pada 3.
The response says "nakshatra": "Purva Ashadha", "nakshatra_pada": 3. The tool's default input is that Moon; switch to Sign + degrees to type it the way the response gives it.
Boundaries and the KP variant
Spans are half-open: a longitude exactly on 13°20′ belongs to Bharani, not Ashwini. The KP endpoints resolve the nakshatra with one extra step - a quotient within 1e-9 of a whole number is snapped up to it - so the two can only disagree for a value within about 0.00005″ of a boundary. Across 6,086 test longitudes, including every boundary and a 1e-7° hair either side, this tool matches the engine's functions exactly.
Common mistakes
- Feeding a tropical longitude. A tropical value is about 24° higher - almost two nakshatras. Convert first with the tropical to sidereal converter.
- Using `degree_in_sign` as the longitude. Add 30° for every sign before it (Aries = 0).
- Off-by-one indexes. The tool and the KP endpoints'
nakshatra_indexcount Ashwini as 1; a zero-based array lookup needsindex - 1. - Comparing a KP nakshatra with a Lahiri one. KP-Newcomb longitudes are 5.81′ higher, enough to cross a boundary near the edge.
FAQ
- Does the pada tell me the navamsa?
- Each pada is 3°20′, the same size as a navamsa part, and the 108 padas line up with the 108 navamsa parts of the zodiac. To get the navamsa sign itself use the divisional chart calculator.
- Which Moon longitude should I enter for the birth nakshatra?
- The Lahiri sidereal Moon, as
POST /v1/charts/birthreturns it. The same nakshatra drives the starting dasha - see the Vimshottari balance calculator. - Can I type degrees, minutes and seconds?
- Yes:
260 32 23.7,260°32′23.7″and260:32:23.7all read as 260.539917°.