Kundali Matching Calculator delivers Vedic marriage compatibility using sidereal Moon position, Lahiri ayanamsha and classical Ashtakoota scoring. Results highlight gunas, doshas, emotional harmony, stability, growth and final guidance in a clean decision focused layout for couples worldwide.
The Kundali Matching Calculator is a web-based computational tool designed to evaluate the astrological compatibility between two individuals based on Vedic algorithms. This application processes birth data to generate a quantitative score known as the Guna Milan, which is derived from the positions of the Moon and Mars at the time of birth. The primary function of the Kundali Matching Calculator is to execute the Ashtakoota matching system, a mathematical model that aggregates scores across eight distinct categories of compatibility.
The calculator converts input variables—specifically date and time of birth—into astronomical coordinates. It determines the sidereal longitude of the Moon and Mars, applies the Lahiri Ayanamsha correction, and identifies the specific Nakshatra (constellation) and Rashi (zodiac sign) for both the boy and the girl. These astronomical data points are then cross-referenced against static lookup tables and conditional logic to produce a composite score out of a maximum of 36 points.
In addition to the aggregate score, the Kundali Matching Calculator computes specific astrological conditions (Doshas), such as Mangal Dosha and Nadi Dosha, based on geometric relationships between planetary positions. The output is a comprehensive dashboard that displays numerical values, bar charts, and status indicators representing the calculated alignment between the two profiles.
Inputs Used by the Kundali Matching Calculator
To perform the necessary astronomical calculations, the Kundali Matching Calculator requires specific inputs for both the “Boy” and the “Girl.” These inputs act as the seeds for the algorithm to determine planetary positions relative to the epoch (January 1, 2000).
- Full Name: This text field serves as an identifier for the report. It is used to label the output data in the dashboard and the downloadable CSV file. It does not influence the mathematical calculation of the Guna score.
- Date of Birth (YYYY-MM-DD): This is a critical input. The code uses the date to calculate the number of days passed since the reference epoch (J2000.0). This delta is used in linear interpolation formulas to determine the Mean Anomaly and Mean Longitude of the Moon and Mars.
- Time of Birth (HH:MM): The time input refines the calculation of the number of days by adding a fractional component (Time / 24 hours). This allows the Kundali Matching Calculator to determine the Moon’s position with greater precision, as the Moon moves approximately 13 degrees per day. A default value of 12:00 (noon) is applied by the code if the time is not specified.
These inputs are processed locally within the browser to generate the astronomical coordinates required for the matching logic.
How the Kundali Matching Calculator Works
The internal processing of the Kundali Matching Calculator follows a linear sequence of astronomical computation followed by comparative logic.
1. Astronomical Coordinate Calculation
The system first converts the user’s birth date and time into a continuous time variable. It then calculates the Moon’s position using the following steps:
- Mean Anomaly Calculation: The code computes the mean anomaly based on the days elapsed since the epoch.
- Equation of Center: A sine function is applied to the mean anomaly to correct for the elliptical nature of the orbit.
- True Longitude: The correction is added to the mean longitude.
- Ayanamsha Correction: The tool subtracts a value approximating the Lahiri Ayanamsha (precession of the equinoxes) to convert the tropical position into a sidereal (Vedic) position.
The resulting degree (0–360) is divided by 13.33 to determine the Nakshatra index (0–26) and by 30 to determine the Rashi index (0–11). A similar process determines the sidereal position of Mars to evaluate Mangal Dosha.
2. The Ashtakoota Calculation Logic
Once the Rashi, Nakshatra, and Planetary Lords are identified, the Kundali Matching Calculator runs the calculateGuna function. This function compares the Boy’s data against the Girl’s data across eight specific categories (Kootas):
- Varna (1 Point): This is calculated by comparing the Rashi indices. If the Boy’s Rashi index is greater than or equal to the Girl’s, 1 point is awarded. Otherwise, 0 points are given.
- Vashya (2 Points): The code assigns each Rashi to a specific group (e.g., Human, Quadruped, Water-dweller). It compares the groups to assign 2, 1, 0.5, or 0 points based on a predefined compatibility matrix.
- Tara (3 Points): This is based on the distance between Nakshatras. The calculator computes
(GirlNak - BoyNak + 27) % 27. The result is taken modulo 9. If the remainder is 2, 4, or 6, the score is 0; otherwise, it is 1.5. This process is repeated for the reverse direction (Boy to Girl) and summed for a maximum of 3 points. - Yoni (4 Points): Each Nakshatra is assigned an animal symbol in the
nakDataarray. The code checks a list of “enemy pairs” (e.g., Cat vs. Rat). If the pair is hostile, the score is 0. If the Yoni is identical, the score is 4. Other combinations yield 2 points. - Maitri (5 Points): This checks the relationship between the ruling planets (Lords) of the Moon signs. The Kundali Matching Calculator classifies relationships as Friendly, Neutral, or Enemy based on hardcoded arrays (
grpAandgrpB). If both lords belong to the same group or are identical, 5 points are awarded. - Gana (6 Points): Nakshatras are classified as Deva (Divine), Manushya (Human), or Rakshasa (Demon). If the Gana is identical, 6 points are awarded. A Deva-Rakshasa or Manushya-Rakshasa pair may result in 0 points depending on the order.
- Bhakoot (7 Points): This measures the distance between the two Moon signs. If the distance is 2/12, 5/9, or 6/8 positions apart, it flags a “Bhakoot Dosha” (0 points). However, the code includes an exception: if the planetary lords of the signs are the same, the score remains 7.
- Nadi (8 Points): Each Nakshatra is assigned a Nadi (Adi, Madhya, or Antya). If the Nadis are different, the full 8 points are awarded. If they are the same, the score is 0, indicating Nadi Dosha.
3. Mangal Dosha Logic
The Kundali Matching Calculator evaluates Mangal Dosha relative to the Moon Sign (Chandra Lagna). It calculates the house position of Mars relative to the Moon. If Mars falls in the 1st, 2nd, 4th, 7th, 8th, or 12th house, the profile has Dosha. The code checks for cancellation: if both have it, or if Mars is in the exact same sign for both, the status is set to “Cancelled.”
Results and Metrics Explained
The Kundali Matching Calculator presents the output through various metrics displayed on the dashboard. Each metric is a direct mathematical derivation of the Guna calculation.
Aggregate Score and Suitability
- Guna Score: This is the sum of the points obtained in the eight categories (Varna + Vashya + Tara + Yoni + Maitri + Gana + Bhakoot + Nadi). The maximum possible value is 36.
- Marriage Suitability: This is a conditional string output based on the total score and Nadi status.
- Suitable: Returns if the total score is ≥ 24 AND Nadi score is 8 (no Nadi Dosha).
- Not Recommended: Returns if the total score is < 18 OR Nadi score is 0 (Nadi Dosha present).
- Conditional: Returns for all other score combinations.
Core Decision Factors
- Dosha Impact:
- Mangal: Displays “No,” “Yes (One Side),” or “Cancelled” based on the geometric angle between Mars and the Moon.
- Nadi: Displays “Yes” if the Nadi score is 0; otherwise “No.”
- Bhakoot: Displays “Yes” if the Bhakoot score is 0; otherwise “No.”
- Dosha Severity Bar: A visual representation where severity percentages are summed: 50% for Nadi Dosha, 30% for Bhakoot Dosha, and 20% for single-side Mangal Dosha.
Detailed Compatibility Metrics
- Family Compatibility: Derived from the Vashya score. A score ≥ 1 is labeled “Good”; otherwise, “Moderate.”
- Emotional Bond: Derived from the Maitri score. A score ≥ 4 is labeled “Strong Bond”; otherwise, “Average.”
- Physical Chemistry: Derived from the Yoni score. A score of 4 is “Strong Attraction,” while 0 is “Weak (Enemy Yoni).”
- Trust & Stability: Derived from the Gana score. A score of 6 translates to “High Trust.”
- Long Term Stability: Returns “Stable” if Bhakoot is 7 points, and “Unstable” if 0 points.
- Genetic Sensitivity: Directly linked to the Nadi score. A score of 8 is labeled “Good Potential,” while 0 is “Genetic Sensitivity.”
Dynamic and Calculated Percentages
- Conflict Risk: This metric calculates the inverse of the Maitri (Friendship) score. The formula used is $100 – ((Maitri Score / 5) \times 100)$. A low Maitri score results in a high Conflict Risk percentage.
- Boy/Girl Adjustment: These values calculate a percentage based on Varna and Vashya scores. The base value is 70, adding 20 points if specific Varna or Vashya thresholds are met.
- Power Balance: This is a split-bar visualization. The Boy’s share is calculated as $40 + (Vashya Score \times 5)$, clamped between 20% and 80%. The Girl’s share is the remaining percentage.
- Growth Together: Based on the Tara score. A score ≥ 2 is labeled “Prosperous.”
Interpreting the Calculation Output
The Kundali Matching Calculator provides numeric values that represent the alignment of astrological variables. Interpretation of these values is strictly numerical based on the code’s logic thresholds.
High vs. Low Guna Scores
A higher numeric value in the “Guna Score” indicates a higher number of matches across the Ashtakoota categories.
- 18 or less: Indicates that less than 50% of the maximum points were achieved. The code explicitly categorizes this as “Not Recommended.”
- 18 to 24: Indicates a mid-range match. The code labels this as “Conditional,” implying some categories match while others do not.
- 24 to 36: Indicates that two-thirds or more of the criteria have been met. If Nadi Dosha is absent, the code categorizes this as “Suitable.”
Dosha Indicators
- Nadi Dosha (0 points): This indicates that both input dates map to the same Nadi category (e.g., both are Adi). In the logic of the Kundali Matching Calculator, this results in a strict penalty, setting the recommendation to “Not Recommended” regardless of the total score.
- Bhakoot Dosha (0 points): This indicates the Rashi positions are in unfavorable angles (6/8 or 2/12) without the mitigating factor of shared planetary lords.
- Mangal Dosha: “Yes (One Side)” means the Mars house condition is met for one profile but not the other, and no cancellation logic (such as being in the same sign) applied.
Radar Chart Visualization
The radar chart plots the obtained score against the maximum potential score for each of the eight categories.
- Full Extension: If the colored area reaches the outer edge of the web for a specific label (e.g., “Love”), it indicates maximum points were awarded for that category (Bhakoot).
- Center Collapse: If the colored area collapses to the center for a label (e.g., “Health”), it indicates 0 points were awarded (Nadi Dosha).
Assumptions and Calculation Limits
The Kundali Matching Calculator operates under specific mathematical constraints and hardcoded assumptions inherent to the provided code.
- Ayanamsha Approximation: The tool uses a linear approximation formula for the Lahiri Ayanamsha: $23.86 + (days / 36525) \times 1.397$. It does not use precise ephemeris files, leading to potential minor deviations in degree calculations compared to NASA-grade ephemerides.
- Moon-Based Calculation: The entire system is based on the position of the Moon (Chandra) and Mars. It does not calculate the Ascendant (Lagna) because the inputs do not include geographic location (Latitude/Longitude). Consequently, all house positions for Mangal Dosha are strictly Chandra Lagna (Moon Sign) based.
- Hardcoded Planetary Lords: The ruling planets for the zodiac signs are stored in a static array (
rashiLords). The tool evaluates Maitri based on the permanent relationship between these lords, not the transient relationship based on their current positions in the sky. - Mangal Dosha Scope: The calculator checks Mars only in houses 1, 2, 4, 7, 8, and 12 relative to the Moon. It does not check from Venus or the Ascendant. The cancellation logic is limited to “Both have Dosha” or “Mars is in the same sign.” It does not account for cancellations based on specific planetary aspects (e.g., Saturn aspecting Mars).
- Simplified Time Zone: The code assumes the date and time inputs are relative to a standard frame or the user’s local context. It does not perform timezone conversions (e.g., UTC to IST). The
getAstrofunction treats the input time as the absolute time elapsed since the J2000 epoch relative to the client’s system clock interpretation of the date string. - Nakshatra Data: The properties of Nakshatras (Deity, Yoni animal, Nadi type) are retrieved from a static object array (
nakData) of 27 items. Abhijit Nakshatra is not included in this system.
Estimation Disclaimer
The results generated by this Kundali Matching Calculator are algorithmic estimates based on simplified astronomical formulas and standard logic tables. Astrological calculations can vary based on Ayanamsha selection and location-specific coordinates, which are not utilized in this specific codebase.
Related Tools & Calculators:
- Rahu Ketu Dosha Calculator
- Mangal Dosha Calculator
- Karmic Destiny Calculator
- Baby Name Numerology Calculator
- Toxic Relationship Calculator
- Twin Flame Love Calculator
- Karmic Soulmate Twin Flame Calculator
- Lucky Colour Calculator
- Twin Flame Birthday Calculator
- Personality Number Calculator
- Conductor Number Calculator
- Military Retirement Divorce Calculator
- Love Calculator
- Gay Zodiac Compatibility Calculator
- Name Numerology Calculator
- Angel Number Calculator
- Challenge Number Calculator
- Zodiac Sign Calculator
- Kundali Matching Calculator
- Attitude Number Calculator
- Bhakoot Dosha Calculator