Age Calculator — Find Your Exact Age
Calculate your exact age in years, months, days, hours, and seconds from any birth date. Set a custom target date to see your age on any past or future day. 100% free, runs entirely in your browser.
Advertisement
How to use
- Step 1: Enter your date of birth in the 'Birth Date' field
- Step 2: Optionally, set a target date (defaults to today)
- Step 3: Click 'Calculate Age' to see results instantly
- Step 4: View your age broken down into years, months, days, hours, minutes, and seconds
- Step 5: Use the 'Copy Results' button to save your calculation
How age calculation works
Calculating someone's exact age sounds simple — subtract their birth date from today's date. But because months have different lengths and years occasionally have an extra day (a leap year), doing it precisely takes a little care. Our Age Calculator handles all of this for you, but here's how the math actually works under the hood.
Step 1 — full years. First, we count how many complete years have passed between the birth date and the target date. A "complete year" only counts if the target date is on or after the same month and day as the birth date. Someone born on March 5, 1990 is exactly 36 years old on March 5, 2026 — but on March 4, 2026, they are still only 35.
Step 2 — leftover months. Next, we add as many complete months as possible from the last full birthday to the target date. Month boundaries follow the calendar: if the day-of-month on the target date is earlier than the day-of-month on the birth date, that final month doesn't count yet.
Step 3 — leftover days. Finally, we count the remaining days. This accounts naturally for the fact that February has 28 or 29 days, April has 30, and so on. We never just divide the total days by 30 — that introduces error of up to five days per year.
Leap years. A leap year occurs every four years, except for years divisible by 100 but not by 400 (so 2000 was a leap year, but 2100 will not be). Because we use real calendar arithmetic instead of a fixed 365-day year, leap days are counted correctly.
The simplified formula: Age = TargetDate − BirthDate, computed using calendar-aware date arithmetic from the JavaScript Date object plus the date-fns library. Everything runs locally in your browser; no data is sent to any server.
Advertisement
Examples
Three worked examples showing exactly what the calculator returns for common scenarios. Each table shows the inputs and the full breakdown — useful if you want to verify the math by hand or understand how the tool handles edge cases like leap years.
| Birth date | March 5, 1990 |
|---|---|
| Target date | May 6, 2026 |
| Age | 36 years, 2 months, 1 day |
| Total months | 434 |
| Total weeks | 1,887 |
| Total days | 13,211 |
| Day of week born | Monday |
| Birth date | March 1, 2020 |
|---|---|
| Target date | May 6, 2026 |
| Age | 6 years, 2 months, 5 days |
| Total days | 2,258 |
| Total hours | 54,192 |
| Notes | Spans the 2020 and 2024 leap days |
| Birth date | July 14, 1965 |
|---|---|
| Target date | July 14, 2030 |
| Age | 65 years, 0 months, 0 days |
| Days until next birthday | 365 |
| Use case | Confirms target retirement age of 65 |