npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

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.

Readme

vedic-kundali

npm downloads minzipped size types license

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-panchanga

Quick 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 age

What 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 timezonerequired | — | | 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: 1 mahādaśā only, 2 + antardaśā, 3 (default)
    • pratyantardaśā, 4 + sūkṣma-daśā.
  • years — how many years of mahādaśā to generate from birth. Default 120 (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.ts for 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.

License

MIT