Age Calculator
Exact age in years, months, days. Next birthday countdown & zodiac.
Calculate the exact number of days, working days, weeks, and hours between any two dates — using Gregorian-aware arithmetic with optional Bangladesh public holiday exclusion.
Step By Step
Worked Example
Use this sample to sanity-check your inputs and understand what the final result represents.
Final Result
89 calendar days · 12 weeks 5 days · 2 months 30 days · 64 working days · 25 weekend days
Methodology
This section explains the calculation logic, assumptions, and source material used to make the result more trustworthy and easier to verify.
Total days = ⌊ (End − Start) ÷ 86,400,000 ms ⌋ — standard Julian Day difference (ISO 8601 / RFC 5545). Years–months–days breakdown uses Gregorian-aware arithmetic: whole calendar years, then whole calendar months, then remaining days — the same method used by most HR and legal systems. Working days = Σ weekdays (Mon–Fri) in the range, optionally minus fixed public holidays. Hours = Total days × 24. References: ISO 8601:2019 (date and time formats); Gregorian calendar reform (1582, Pope Gregory XIII); ECMA-262 §21.4 (JavaScript Date object).
The calculator subtracts the earlier date from the later date in milliseconds, then divides by 86,400,000 (the number of milliseconds in one day) and rounds to the nearest whole number. This is the standard Julian Day Number difference used in most calendar software and follows the proleptic Gregorian calendar (ISO 8601).
Because calendar months have different lengths (28–31 days). The years–months–days breakdown uses Gregorian-aware arithmetic: it counts exact calendar years, then exact calendar months, then remaining days. This matches how HR departments and courts count contract periods. The 'total days' figure is always the precise day count.
Working days are Monday through Friday, excluding Saturday and Sunday. When the 'Exclude Bangladesh public holidays' option is checked, fixed national holidays (21 Feb, 26 Mar, 14 Apr, 1 May, 16 Dec, 25 Dec) are also skipped. Note that moveable Islamic holidays such as Eid-ul-Fitr and Eid-ul-Adha are not included because their dates shift each year by the lunar calendar.
Yes. JavaScript's Date object follows the proleptic Gregorian calendar and handles leap years automatically. February 29 is treated as a valid date in any leap year (years divisible by 4, except centuries unless divisible by 400). The day count between, for example, 28 Feb 2024 and 1 Mar 2024 correctly returns 2 days because 2024 is a leap year.
The calendar-day count has no practical limit within JavaScript's date range (roughly ±270,000 years from 1970). The working-day counter is restricted to ranges of 10 years or fewer because iterating day-by-day over very long spans is computationally heavy in the browser. The hours figure is displayed for ranges up to approximately 136 years.
This tool gives a reliable starting point but should not replace professional legal advice. Contract law in Bangladesh (and most jurisdictions) may define 'day' differently — for instance, some clauses count calendar days inclusively (i.e., both the start and end day). Always confirm the counting method specified in your agreement or consult a qualified lawyer.
0
calendar days
0y 0m 0d · 0w 0d
0
Total weeks
0
Total hours
1
Working days
-1
Weekend days
Start date is 1 day before today