Folklore Tradition

The Chinese Gender Calculator is an ancient 700-year Qing Dynasty cultural artifact.

Imperial Archive Suite•算法与数据源

Calculation Methodology & Dataset Provenance

Complete documentation of our astronomical lunisolar calendar engine, traditional age reckoning rules, Qing Dynasty manuscript provenance, and technical limitations.

Last Reviewed: October 2026

1. Astronomical Engine & National Standards

Our application performs all calendar arithmetic using lunar-typescript (v1.8.6), an open-source, zero-dependency lunisolar engine compliant with China National Standard:

GB/T 33661-2017: 《农历的编算和颁行》 (Calculation and Promulgation of the Chinese Calendar)

The calendar conversion algorithms compute high-precision astronomical ephemerides, calculating:

  • True Solar Terms (二十四节气): Determined by the Sun's celestial longitude in the ecliptic coordinate system (multiples of 15°).
  • Synodic New Moon (朔日): Pinpointed to the precise day when the Moon and Sun share the exact ecliptic longitude.
  • Sexagenary Cycle (干支历): Accurate derivation of Heavenly Stems (天干) and Earthly Branches (地支) for Year, Month, Day, and Hour.
Astronomical Benchmark Comparison: Output dates have been cross-verified against official ephemerides published by the Purple Mountain Observatory (PMO, Chinese Academy of Sciences) and the Hong Kong Observatory (HKO).

2. Supported Date Range & Ephemeris Scope

• Supported Solar Years: January 1, 1900 through December 31, 2100 (200-year continuous ephemeris).
• Supported Lunar Years: 1900 (Geng-Zi / 庚子) through 2100 (Geng-Shen / 庚申).
• Timezone Normalization: Lunisolar boundaries are resolved against China Standard Time (UTC+8 / Beijing Meridian 120°E), the standard reference meridian for traditional lunisolar calculations.

3. Nominal Lunar Age (Xūsuì / 虚岁) Convention

In traditional East Asian societies, age reckoning differs fundamentally from the Western chronological model (Zhōusuì / 周岁):

Maternal Lunar Age = Conception Lunar Year − Mother's Birth Lunar Year + 1

The Chinese New Year Boundary Rule: If the mother was born between January 1 and Chinese New Year Day (which fluctuates between January 21 and February 20), her lunar birth year is the preceding lunar year. Our engine calculates this boundary automatically to prevent common 1-to-2 year calculation errors.

4. Prediction Chart Source & Dataset Canonization

Our application implements the canonical Qing Dynasty Imperial Tomb Manuscript (清宫生男生女表), historically archived in imperial collections and reproduced in traditional Chinese Tong Sheng (通胜) almanacs.

Total Documented Cells336 Empirical Cells28 Ages × 12 Lunar Months
Male Predictions (Boy · 男)164 Cells (48.8%)Canonical manuscript values
Female Predictions (Girl · 女)172 Cells (51.2%)Canonical manuscript values

Both the interactive chart ([`InteractiveGenderChart`](file:///C:/Users/acer/.gemini/antigravity/scratch/chinese-gender-predictor/src/components/chart/InteractiveGenderChart.tsx)), the main prediction calculator ([`genderPrediction.ts`](file:///C:/Users/acer/.gemini/antigravity/scratch/chinese-gender-predictor/src/lib/calculations/genderPrediction.ts)), and the conception planner ([`conceptionPlannerEngine.ts`](file:///C:/Users/acer/.gemini/antigravity/scratch/chinese-gender-predictor/src/lib/planner/conceptionPlannerEngine.ts)) reference the exact same underlying matrix dataset ([`chartDataset.ts`](file:///C:/Users/acer/.gemini/antigravity/scratch/chinese-gender-predictor/src/lib/chart/chartDataset.ts)).

5. Limitations & Non-Guessing Policy

  • Strict Age Boundaries (Ages 18–45): The original Qing Dynasty manuscript contains no empirical data for maternal ages under 18 or over 45. While many internet websites fabricate random extrapolation algorithms, our platform maintains historical integrity by displaying an explicit "Outside Historical Scope" state rather than guessing.
  • Intercalary Leap Months (闰月): We adhere to the traditional 15-day almanac rule: days 1–15 are evaluated as the base month; days 16 through the end of the leap month resolve to the following month.
  • Scientific & Diagnostic Limitations: Peer-reviewed empirical evaluations (most notably the Karolinska Institute demographic study of 2.8 million Swedish births by Villamor et al.) demonstrate that the Chinese Gender Chart has an actual accuracy rate of 50.2%, exactly matching random probability. This tool is intended for cultural preservation, historical exploration, and lighthearted entertainment.