🧮 Age Calculator (Exact to Day)

Compute exact age in years, months and days.

📐 計算公式
週歲 = 計算日期 − 出生日期,按年/月/日三段差值借位:日差 <0 時月減一併補上個月實際天數(new Date(年, 月, 0)),月差 <0 時年減一併 +12;另輸出總天數(毫秒差 ÷86400000 取整)、總週數與距下次生日天數。校驗:日期無法解析提示「請選擇有效的出生日期與計算日期」,出生晚於計算日期提示「出生日期不能晚於計算日期」。判據:生肖按出生年 (年−4) mod 12 查表,星座按生日區間查表(未命中預設摩羯座)。
輸入出生日期,計算精確年齡(年/月/日)、總天數、下次生日倒計時、生肖與星座。
💡 年齡按公曆計算:年=計算年-出生年(未到生日則減1),月、日按日曆逐月推算;總天數為出生日到計算日的自然日數。

Formula & Standard References

Item Formula / Note Source / Standard
Exact ageYears completed plus months/daysCalendar rules
Full vs nominal ageFull year count vs nominal ageChinese age convention
End-of-month ruleFeb 29 → Feb 28 in non-leap yearsCalendar convention
Timezone effectUse local dateISO 8601
Leap year rule97 leap years per 400 yearsGregorian calendar
Legal usageLegal age per registered birth dateCivil Code provisions
⚠️ 使用說明與注意事項
  • 出生日期不能晚於計算日期
  • 生肖按農曆年份粗略對應公曆,1-2月可能跨年偏差
  • 星座按公曆出生日期劃分
  • 本工具純前端執行,資料不會上傳到伺服器

🕘 最近計算

暫無計算記錄