vedic-kundali
v0.1.0
Published
Vedic birth-chart (kundali) engine on top of vedic-panchanga — all nine grahas, lagna, the 16 classical divisional charts (Shodashavarga), Chandra/Surya Kundali, Bhava Chalit, and a Vimshottari Mahadasha/Antardasha/Pratyantardasha calculator.
Maintainers
Readme
vedic-kundali
Compute a full Vedic birth chart (kuṇḍalī / janma-patrikā) on top of
vedic-panchanga. Give it a
birth date, time and place and it returns all nine grahas, the lagna, the D1
Rāśi chart, Chandra & Sūrya Kuṇḍalī, Bhāva Chalit, all sixteen classical
divisional charts (the Ṣoḍaśavarga, D1–D60), and a Vimśottarī Mahādaśā /
Antardaśā / Pratyantardaśā timeline you can query by date or by age.
- All nine grahas — Sun, Moon, Mars, Mercury, Jupiter, Venus, Saturn, Rāhu, Ketu — each with sidereal rāśi, degree, nakṣatra + pada, and retrograde status
- Lagna (ascendant) from the exact birth instant and place
- D1 Rāśi/Lagna chart, whole-sign houses
- Chandra Kuṇḍalī and Sūrya Kuṇḍalī — the same placements, houses re-numbered from the Moon / Sun instead of the lagna
- Bhāva Chalit (cusp) chart — equal-house approximation from the lagna's exact degree
- All sixteen Ṣoḍaśavarga charts — D1, D2 (Hora), D3 (Drekkana), D4 (Chaturthamsa), D7 (Saptamsa), D9 (Navamsa), D10 (Dasamsa), D12 (Dwadasamsa), D16 (Shodasamsa), D20 (Vimsamsa), D24 (Chaturvimsamsa), D27 (Bhamsa), D30 (Trimsamsa), D40 (Khavedamsa), D45 (Akshavedamsa), D60 (Shashtiamsa) — each with its own lagna and whole-sign houses
- Vimśottarī Daśā — birth balance, the full Mahādaśā sequence (nested Antardaśā / Pratyantardaśā / Sūkṣma-daśā), "what's running right now", and "what's running at this date / this age"
- Zero runtime dependencies beyond
vedic-panchanga, ESM + CJS, full TypeScript types
npm install vedic-kundali vedic-panchangaQuick start
import { generateKundali, vimshottariDasha, activeDashaChain } from "vedic-kundali";
const k = generateKundali({
date: "1990-06-15",
time: "14:30", // birth wall-clock time, HH:MM or HH:MM:SS
latitude: 28.6139, // north positive
longitude: 77.209, // east positive
timezone: "Asia/Kolkata", // IANA id; defaults to "Asia/Kolkata"
});
console.log(k.ascendant.rashiName.iast, k.ascendant.degreeInRashi.toFixed(2)); // "Meena 28.75"
console.log(k.moonSignName.iast, k.nakshatra.name.iast, k.nakshatra.pada); // janma rāśi & nakṣatra
console.log(k.grahas.Jupiter.rashiName.iast, k.grahas.Jupiter.isRetrograde);
console.log(k.vargas.D9.positionNames.Moon.iast); // Moon's Navamsa sign
// Vimśottarī daśā
const dasha = vimshottariDasha(k); // levels: 3 (mahā/antar/pratyantar), years: 120 by default
console.log(dasha.birth.lord, dasha.birth.balanceYears); // dasha lord running at birth + years left of it
const runningNow = activeDashaChain(dasha.mahadashas); // [mahadasha, antardasha, pratyantardasha] active today
for (const p of runningNow) {
console.log(p.level, p.lord.padEnd(8), p.start.toISOString(), "→", p.end.toISOString());
}Querying the daśā by date or by age
import { activeDashaChain, upcomingMahadashas, dateAtAge } from "vedic-kundali";
// What's running on a specific date?
activeDashaChain(dasha.mahadashas, new Date("2030-01-01"));
// What's running (and what's next) at a given age?
const at42 = dateAtAge(k.birthInstant, 42);
activeDashaChain(dasha.mahadashas, at42);
upcomingMahadashas(dasha.mahadashas, at42); // every mahādaśā still current or ahead at that ageWhat you get
type Kundali = {
input: { date, time, latitude, longitude, timezone, ayanamsa };
birthInstant: Date; // resolved UTC instant
ayanamsaValue: number; // degrees
ascendant: Ascendant; // { longitude, rashi, rashiName, degreeInRashi, nakshatra }
grahas: Record<GrahaName, GrahaPosition>; // + { graha, name, isRetrograde }
moonSign: number; moonSignName: Name; // janma rāśi, for convenience
nakshatra: NakshatraPlacement; // janma nakṣatra, for convenience
houses: Bhava[]; // D1 whole-sign houses from the lagna
chandraKundaliHouses: Bhava[]; // same placements, renumbered from the Moon
suryaKundaliHouses: Bhava[]; // same placements, renumbered from the Sun
bhavaChalit: Bhava[]; // equal-house cusp chart
vargas: Record<VargaCode, DivisionalChart>; // D1..D60, each with lagnaRashi, positions, houses
};GrahaPosition / Ascendant share a SignPlacement: { longitude, rashi (1–12),
rashiName, degreeInRashi (0–30) }, plus nakshatra: { index (1–27), name, pada
(1–4), lord }. Bhava is { house (1–12), rashi, rashiName, grahas: GrahaName[] }.
Options
| Option | Type | Default |
| ---------- | ------------------------------------------------- | ---------------- |
| date | "yyyy-mm-dd" — required | — |
| time | "HH:MM" / "HH:MM:SS" wall-clock in timezone — required | — |
| latitude | number (−90…90, north positive) — required | — |
| longitude| number (−180…180, east positive) — required | — |
| timezone | IANA id, e.g. "America/New_York" | "Asia/Kolkata" |
| ayanamsa | "lahiri" \| "raman" \| "kp" \| "fagan_bradley" | "lahiri" |
vimshottariDasha(kundali, { levels?, years? })
levels— how deep to nest:1mahādaśā only,2+ antardaśā,3(default)- pratyantardaśā,
4+ sūkṣma-daśā.
- pratyantardaśā,
years— how many years of mahādaśā to generate from birth. Default120(one full Vimśottarī cycle).
Returns { birth: { nakshatra, lord, balanceFraction, balanceYears }, mahadashas: DashaPeriod[] }.
Each DashaPeriod is { level, lord, lordName, start, end, sub: DashaPeriod[] }.
activeDashaChain(periods, at?) walks down to the deepest period covering
at (default now); upcomingMahadashas(periods, after?) lists every
mahādaśā still running or ahead of a date; dateAtAge(birthInstant, years)
turns an age into a Date for either of those.
Lower-level exports
import {
computeGrahas, computeAscendant,
buildDivisionalChart, buildAllVargas,
wholeSignHouses, bhavaChalitHouses,
rashiPlacement, nakshatraPlacement, vargaSign,
planetGeocentricPosition,
computeVimshottariDasha,
GRAHA_ORDER, GRAHA_NAMES, NAKSHATRA_LORDS, VIMSHOTTARI_YEARS, VARGA_DEFINITIONS,
} from "vedic-kundali";Accuracy & limitations
- Sun & Moon come straight from
vedic-panchanga(Meeus ch. 25 / the truncated ELP-2000/82 series) — see its own accuracy notes. - Mercury, Venus, Mars, Jupiter, Saturn use Standish's (JPL) low-precision Keplerian orbital elements, valid 1800–2050, light-time corrected but not aberration-corrected — good to roughly 1′, well inside what a rāśi/nakṣatra placement needs. Outside 1800–2050 accuracy degrades further from the linear element-rate extrapolation.
- Rāhu/Ketu use the mean lunar node (Meeus 22.2) — the conventional choice in most Vedic software. The true (oscillating) node is not implemented.
- Ascendant follows Meeus ch. 13; extreme polar latitudes are not specially handled.
- Divisional charts. D1–D12, D24 and D27 follow the specific classical
rule each is known for (see
astro/varga.tsfor citations); D16, D20, D30, D40, D45 and D60 follow the most widely published convention, but these finer vargas have real variation across traditions/software — treat this as a standard reading, not the only one. - Bhāva Chalit is the equal-house approximation (each house spans exactly
±15° around
lagna + (house-1)×30°), not a full Śrīpati/Placidus cusp computation. - Daśā uses a 365.25-day Vimśottarī year throughout, the conventional (Julian-year) length for this system.
- Not yet produced: Yogini/Ashtottari daśā, Ashtakavarga, combustion, planetary aspects (dṛṣṭi), shadbala, and chart-compatibility (kuṇḍalī milan). These can layer on top of the grahas/houses this package already computes.
If you need certified values for a specific tradition or software lineage, cross-check against your reference source.
References
- Standish, E.M. (JPL), "Keplerian Elements for Approximate Positions of the Major Planets" — orbital elements for Mercury–Saturn (1800–2050 AD table).
- Jean Meeus, Astronomical Algorithms, 2nd ed., Willmann-Bell, 1998 — chapters 13 (ascendant), 22 (nutation & mean node), 33 (planetary positions).
- Bṛhat Parāśara Horā Śāstra — the classical source for the Ṣoḍaśavarga divisional-chart rules and the Vimśottarī daśā scheme.
